Reputation: 13195
I tried
git checkout OTHER_BRANCH -- /path/to/folder
the problem is with files that exist on current branch, but do not exist on the other branch. I want to delete these.
Upvotes: 25
Views: 11346
Reputation: 301127
I think you want:
git rm -r /path/to/folder
git checkout OTHER_BRANCH -- /path/to/folder
Upvotes: 45