Uh oh. How do you do that with git? To make matters worse, I had also moved the file.
Fortunately, I hadn't made any changes to the master branch. That made it a little bit easier than it otherwise would have been.
I won't remember this a few weeks from now when I need it again, so here's how I did it:
_ git show master:org/blah/foo.java > org/blah/bleh/foo.java _
I used the branch name master, but you can give it any valid identifying value: like an SHA-1 value or HEAD, or even something like HEAD-5 (i.e., HEAD minus 5).
No comments:
Post a Comment