New Git Features in Visual Studio 2017 Update 5

This week we released Visual Studio 2017 Update 5. In this release, we added new Git features which were based on your UserVoice requests to support Git submodules, Git worktreesfetch --prune, and pull --rebase. To learn more about all of our Git features and what’s new in Visual Studio 2017 Update 5, check out our Git tutorials and the Visual Studio release notes.

Git submodules and worktrees

Visual Studio now treats Git submodules and Git worktrees like normal repos. Just add them to your list of Local Repositories on the Team Explorer Connect page and get coding! Please note that you still cannot do anything that requires multi-repo support (such as viewing files in a parent repo and a submodule at the same time). If you would like multi-repo support, please vote on UserVoice.

Configure fetch.prune and pull.rebase

Ever delete a branch on the server, only to see it listed in your local list of branches? The best way to make sure your local list of branches is up-to-date is to use the --prune option when you fetch. Pruning on fetch removes local tracking branches that no longer exist on the server.

Another common Git practice is to rebase your changes (rather than create a merge commit) when you pull. Rebasing helps keep your commit history linear and easy to follow.

Now, it’s easy to set Git to prune on every fetch and rebase on every pullConfigure your default behavior in the Global and Repository Settings in Team Explorer.

6