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

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.

Answers


Visual Studio 2015 does not support pull+rebase. You can achieve it manually by performing a fetch of 'branch' and then do a rebase onto 'origin/branch'. But not automatically.

Visual Studio 2017 (release candidate) will currently perform the pull+rebase if it's configured as default option in your global git settings. It does currently still give you an warning saying "unexpected merge result". I'm hoping this will be fixed before the final version comes out.


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)


This is as close as you can get to doing an actual rebase pull.

First do a fetch on the remote you want to rebase onto. It won't be a "pull --rebase" but you can go to team explorer > branches > remotes > (choose your remote) > right click on the branch you want to rebase onto and click rebase onto click rebase and you have basically done a pull/rebase onto the remote branch.

(but currently this is the only way to rebase onto remote updates without running to a git bash)


Open Git Bash and paste:

git config --global branch.autosetuprebase always

This will make every future pull a pull --rebase.


Need Your Help

AssertionError: View function mapping is overwriting an existing endpoint function: main

python flask

Does anyone know why I can't overwrite an existing endpoint function if i have two url rules like this