I'm using Github, with branches for development
, live
and various feature & bug branches.
When I merge a feature or bugfix into development, I typically do a squash merge (usually through the GH website, although it's equivalent to git merge --squash branchname
).
Then when I update live from development, I squash merge dev into live.
The benefit of this is the commit message is automatically populated with the list of commits (which, because these were also squashed, is a list of PRs).
The problem I'm having is that when even immediately after merge dev into live, the live branch is still listed as behind development - so next time I merge the two, it includes commits that I know are already merged.
I think what I'm doing is the equivalent to:
git checkout feature/1
& make changegit checkout development
git merge --squash feature/1
git commit
git checkout live
git merge --squash development
(adds one commit to live)git commit
git checkout feature/2
& make changegit checkout development
git merge --squash feature/2
git commit
git checkout live
git merge --squash development
(adds two commits to live - bothfeature/1
andfeature/2
)
Why is it not 'completing' the merge and drawing a line under it after step 6?