To maintain a linear history, I use the following approach to merge changes instead of relying on github merge functionality:
git checkout -b feature_x user/feature_x
git rebase master
git checkout master
git merge --no-ff feature_x
git push origin master # On Github: PR gets merged and closed
git branch -D feature_x
The above works fine, but in cases where I have to manually resolve conflicts, the PR does not appear as integrated in Github automatically, and I need to manually close the PR.
Is there a better approach to concatenating pull requests that automatically show that Github PRs are merged and closed?
source
share