Reputation: 2031
I want a branch to hold all the files from my master branch except for foo.txt and foo2.txt. How do I do this?
Upvotes: 6
Views: 9506
Reputation: 4593
You have to branch off from master. Check out a new branch and remove the files you do not want.
git checkout master
Once in master:
git checkout -b new_branch
rm foo.txt
rm foo2.txt
git add -u
git commit -m "removed foo and foo2"
git push origin new_branch
Upvotes: 14