-2

libidn2's punycode testing is broken in the head (the ASCII-only case fails.)

I created a new LOCAL branch to try and determine when it last worked but I need to checkout idn2.h from the head, and puny_encode.c, puny_decode.c, punycode.h, and tests/test-punycode.c each (potentially) from DIFFERENT commits!

How do I do this and get all of then in my newly created testing branch? I normally use Mercurial so I'm having to do a web search for every git command I need and it's getting frustrating!

mouviciel
  • 62,742
  • 10
  • 106
  • 135
Bryan Dunphy
  • 635
  • 1
  • 9
  • 21
  • 2
    You'll find your answer here: [How can I reset or revert a file to a specific revision?](https://stackoverflow.com/q/215718/45249). – mouviciel Oct 26 '20 at 13:42
  • 1
    "I'm having to do a web search for every git command I need and it's getting frustrating!" And asking Stack Overflow for every git command is better? Seriously, I think the best approach is to pause for fifteen or twenty minutes and learn about git. – matt Oct 26 '20 at 13:46

1 Answers1

2

Create a branch at the most convenient place and then checkout the individual files from the other branches/revisions

git checkout -b new-branch starting-point # starting point can be a branch or revision
git checkout branch1 -- file1 file2
git checkout branch2 -- file3 file4

There's no historical relation between the branches/files that you are pulling into your current position, so you know.... you might have edited those files by hand to get then the way they are after bringing them from the other branches, to git there's no difference.

eftshift0
  • 16,836
  • 2
  • 23
  • 36