We have two long-standing branches in our github repo: master and develop. Feature branches get checked out from develop and get checked into develop once a pr is approved. Once we’re ready for a release, we merge develop into master. After this process we reset master and merge master to develop to get them at parity, but when comparing develop to master I still see the commits that went out in the release.
We’re pushing out the release via the following commands:
git checkout develop
git pull
git checkout master
git merge develop
>>> push to master via source control panel in vscode
git tag -a VERSION_NUMBER -m "Release VERSION_NUMBER"
git push --follow-tags
From what I can tell, this works well but if you have any recommendations for improvement I’m all ears.
Then to get master and develop at parity I run the following commands:
git checkout master
git reset --hard
git checkout develop
git merge master
git push
This is where the issue lies. When I compare master & develop (https://github.com/ORG/REPO/compare/master…develop) I still see the commits that were included in that release – no files changed, just the commits. The actual code changes are indeed in master, but they have different commit hashes. So what am I doing wrong? What can I do now to resolve this – rebase, reset, etc? What should I do in the future to ensure master and develop are at parity after a release goes out? Should I be merging from develop to master differently (since the commit hashes are different)? Thanks!