Is it possible to do a Git Pull --rebase with Visual Studio git tools (and can it be set by default)

LocalPCGuy picture LocalPCGuy · Apr 1, 2015 · Viewed 12.5k times · Source

First, as the title says, is it even possible in a single step (i.e. not fetch then rebase), to do a pull --rebase?

Second, is a setting in Visual Studio to force the built-in Team Explorer git tools to always do a pull --rebase rather than a standard pull (fetch/merge).

I am aware you could set the default in the global or project config files with git config branch.autosetuprebase always, but I wanted to specifically find out if Visual Studio could update/change that setting or had a similar option, like most other GUIs have. I haven't been able to find anything, so it seems like it doesn't, hence the question.

Answer

Woonder picture Woonder · Apr 19, 2018

In VS2017 you can use built-in feature to change git settings for rebase: go to Team Explorer -> Home -> Settings -> Global Settings or Repository Settings -> set Rebase local branch when pulling: True (screenshot)