Apparent Pull Request / Branch Mistake
#1
I have just made some more changes and done another commit.  I expected to see a new pull request when I got to GitHub, however, it appears that the new changes were added to the previous pull request.

I am inexperienced with Git and I assumed that 2 commits from the same branch would result in 2 pull requests.

Should I go back into the text of the original pull request and update the description to cover the second batch of changes?

Should I only do 1 commit per branch in the future?

Apologies for any inconvenience.
Reply
#2
Generally keep it to one change per PR, unless the multiple commits are deeply dependant.

In this case, i would look to split the second commit off into another branch, as its possibly a bug fix (note i havent actually looked at it to confirm such), but in the event of a bugfix, there is a possibility to backport to the last release branch (ie Nexus currently). Whereas features or changes in behaviour (your first commit) wont be allowed as a backport.
Reply
#3
Hopefully I have managed to fix it now.
 
  • Firstly, I made backup copies of the files that I had changed.
  • I then rolled-back the latest commit locally with 'git reset HEAD~'.
  • I then did a forced push back to Github removing the second change.  A normal push generated error messages, the push had to be forced to remove the unwanted files from GitHub.
  • I made another branch, updated that with my backup files.
  • After re-testing, I committed, pushed and created a PR.
Reply

Logout Mark Read Team Forum Stats Members Help
Apparent Pull Request / Branch Mistake0