Git: Checkout a single file from a different branch
Okay - let's face it. The following lines are more a personal memo to me than a real protip. But maybe somebody is out there how can't remember that too - or didn't know about.
Sometimes you want to have a single file in your current branch that resists in one of your another local branches.
No worries, Git has all you need for that:
git checkout feature_branch -- path/to/your/wanted/file
where feature_branch</code> is the name of your branch.
(That was a short one of a protip for this time. ;-) )
Written by Daniel Schmidt
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#