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
Written by Thibault Milan
Related protips
2 Responses
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
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#