Last Updated: February 25, 2016
·
873
· clawfire

Checkout a specific file from another branch

If you need to checkout a file, but not from the actual branch but from another one

git checkout develop -- myfile.ext
git commit -m "Retrieve a file from develop

2 Responses
Add your response

Interesting trick. Thanks for sharing

over 1 year ago ·

Little faster: you can leave the double dash (I always do that).

over 1 year ago ·