master branch with a linear history:
master branch is periodically merged to dev branch.
git checkout dev
git merge --no-ff masterdev branch is periodically merged to test branch.
git checkout test
git merge --no-ff devtest branch is periodically merged to prod branch.
git checkout prod
git merge --no-ff test- The "all branches" view gets complicated quite fast, but individual
dev/test/prodbranches look ok - You can edit the commit message when performing a merge, e.g. for adding some semantic meaning to the merge:
- "Merge for release 1.2.3"
- Plain
git rebasewill discard merge commits- If you accidentally make a local commit to e.g.
devbranch and userebaseto remove it, you might accidentally also remove the "merge branch 'master' into dev" -commits. git rebase -i --rebase-merges [commit]will preserve merge commits
- If you accidentally make a local commit to e.g.




