VS code git merge appears as rebase

Tags:

I was very confused until recently since I didn’t understand that git merge can perform fast-forward. In the log, it looks like git merge is performing rebase.

To prevent that, I’m forcing these options:

# Do the fast-forward even when possible, doing the actual merge. This makes
# merge notable.
git config --global merge.ff no
# Merge, but don't submit so that it can be reviewed.
git config --global merge.commit no
# Rebase when pull. 'git config --global pull.ff yes' is possible,
# but it needs rebase or merge anyway if there's a conflict.
git config --global pull.rebase true

Sadly, those options have no impact on vscode’s “Git merge…” command. One should either use plugins like “Git Graph” or do the ‘git merge’ on the command line.

Above are only for my personal projects. For cooperation, probably I’d stick to either a single branch or squash before merge to make changes easier to read.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *