I am trying to git checkout
a single file from another branch.
Everything is fine, but it puts the file in the same directory tree of the branch that I am checking out.
There is a way to specify a different destination folder during git checkout?
This is what I did:
git checkout other_branch -- path/to/file/xxx
git status:
new file: path/to/file/xxx
this the result I need (put xxx into the root directory of my working branch):
new file: ./xxx
You have 2 options
git checkout other_branch -- file.txt && git mv file.txt folder/file.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With