Reputation: 4487
There have been many questions on SOF like these:
but my problem seems a little different and I couldn't get out of it.
Here's what I did:
git checkout -b module1
git add --all
git commit -m "____"
git push origin module1
git checkout -b module2
git add --all
git commit -m "____"
git push origin module2
Now second pull request went with commits of previous module also. TO rectify this I tried:
- after pushing in last step to branch
- I went to master git checkout master
then
- git merge module2
Now if I raise a Pull Request it is still showing commits of module1 in Pull Request.
What can I do to fix this and take care with future branches?
Upvotes: 2
Views: 1206
Reputation: 4487
You were wrong on step 3, here you need to checkout from module1 branch and goto master branch.
For more clearer description, which you can try on any bitbucket/github.com test repo,
you can follow below steps to start from beginning or you can ignore steps which already done and check in your bitbucket/github.com account.
Upvotes: 1