This is part of the Semicolon&Sons Code Diary - consisting of lessons learned on the job. You're in the git category.
Last Updated: 2024-11-23
I was working in the development
branch and made 3 commits. I then merged into
master
. Because master
had the same parent commit as development
, git used
a ff (fast forward) commit, meaning that the fact that these were originally in
the development
branch was no longer shown in the git history. This is a bit
confusing and can be disabled.
git config branch.master.mergeoptions "--no-ff"
Use --no-ff
when you want to preserve the fact of the merge having occurred
(at the expense of adding a commit to your history)