Reputation:
I am using Bitbucket and I have a repository with many branches. I need only two files from another branch in the branch that I am currently working. I have tried git checkout <branch_name> -- <path_to_file>
but it does nothing.
Upvotes: 1
Views: 266
Reputation: 213170
You can just do this:
git checkout other_branch -- file1 file2
(Note: it was not apparent that you had already tried this in the original version of the question, due to a formatting problem - I have now fixed this.)
Upvotes: 1