Reputation: 8719
I cloned my fork of a public repository and made some changes; and then created a pull request.
However, any changes I pushed to my fork after I created that pull request are also being included in the pull request, even though I never requested them to be included?
Why is Git showing the changes that I did not create a pull request for? How can I avoid it?
Upvotes: 1
Views: 57
Reputation: 174614
Thanks, I did not know that. Should I make those branches in my local repository or my repository on github? Also will it not create a lot of branches? If I understand it right every branch will cause a identical copy to be created. I am sorry if my questions are naive.
A branch is not a "copy" of the repository. It just creates a separate history to track changes; and as such it does not increase the disk space used (if that's your concern - I know people new to git seem to think this).
In addition, when you create a pull request from a branch and your pull request is accepted - github will offer you the option to delete that branch (since the changes are now merged into the master):
Upvotes: 1
Reputation: 887195
GitHub pull requests are for a single branch.
They will automatically include all commits push to that branch.
You should make a separate branch for each independent change.
Upvotes: 5