We generally want to use no-ff merges for feature branches but when synchronizing local repository with the upstream one, we do not want merge commits. I.e., we don't want to see merge commits after pulls.
When I configure Git this way:
git config merge.ff false
then also pulls create commits like "Merge origin/master into master". How to avoid it?
Edit: A bit more explanation:
When I have local feature branches merged into my local master and that has not been pushed yet, then when I do a pull I want to get the merge commit "Merge origin/master into master" because that's a real merge.
However, in a case where I 5 minutes ago made a push, then done nothing and then pulled 5 minutes later, I do not want to get the "Merge origin/master into master" because it's just an empty, useless commit (no real merging was done here).
With the merge.ff
being false
by default in our project, is there a switch to pull
to do what I've described above? Or any other workaround?