Git fast-forward pulls but non-fast-forward merges? -


we want use no-ff merges feature branches when synchronizing local repository upstream one, not want merge commits. i.e., don't want see merge commits after pulls.

when configure git way:

git config merge.ff false 

then pulls create commits "merge origin/master master". how avoid it?

edit: bit more explanation:

when have local feature branches merged local master , has not been pushed yet, when pull want merge commit "merge origin/master master" because that's real merge.

however, in case 5 minutes ago made push, done nothing , pulled 5 minutes later, not want "merge origin/master master" because it's empty, useless commit (no real merging done here).

with merge.ff being false default in our project, there switch pull i've described above? or other workaround?

the way avoid perform rebase instead of merge. assuming on master branch, can do:

git fetch git rebase origin/master ... solve conflicts if , finish rebase git push 

you can set 'git pull' perform fetch+rebase with:

git config --global branch.autosetuprebase 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -