1

More than once, we've done a git flow release 1.23 on a release branch, only to discover that master was behind origin/master, and now the new master and origin/master have now diverged.

I've created a feature request to avoid this on git-flow, but apart from manually checking, is there any way to avoid finishing a release when the local master is behind the remote master?

Andrew Grimm
  • 74,534
  • 52
  • 194
  • 322

1 Answers1

2

Considering git flow release starts a release branch from develop, not master, that should not make master diverge from origin/master.

But assuming it would, you might consider writing a client pre-commit hook which would reject any new commit if it detects that master and origin/master don't match.

VonC
  • 1,129,465
  • 480
  • 4,036
  • 4,755