Git master and development out of sync

The process you did is correct, but depending on what you chose one of the following happened.

  • When you performed the PR merge, you chose "Merge", which will create a merge commit on the target (master) branch. Thus Master is 1 ahead of development.
  • When you performed the PR merge, you chose "Squash", in which case it will create a new commit with the changes to target (master) branch. This Master is 1 commit ahead of development and 2 commits behind.
  • When you performed a Fast Forward, if no merge were required, the target and source branch would now be the same. And no merge commit would be added.
  • When you had rebased develop onto master, all changes would be replayed on the master branch and then committed. You'd have to force push develop in that case.

To make sure develop is back in sync with master, you have a few options:

  • Merge master back to develop. Develop will be 1 merge commit ahead of master afterwards.
  • Rebase develop onto master and force push. Develop will be the same as master + any outstanding changes will be replayed on top of develop.
  • Reset develop to master and force push. Develop will be the same as master + any outstanding changes will be lost.
  • Delete/rename the current develop branch and create a new one from master.