Runar Ovesen Hjerpbakk

Science-based software development

Using Git in Visual Studio

GitHub is fully intergrated with Visual Studio 2015.

Git is the preferred source control system for modular code bases, but TFS also lives on with both server and local workspaces. Git is the natural evolution of SCMs. Git is the natural evolution of SCMs.

View History is improved in Visual Studio 2015 with a new graphical view. That's nice for people with command line phobia, such as myself. That's nice for people with command line phobia, such as myself.

Sync does a pull, merge and push, all in once.

Commits are immutable, but you can create a new history. This can be restricted in TFS using permissions.

Be mindful of your line endings, use a git attribute file. Default gitattribute and gitignore files are available from

The average number of commits per push is not surprisingly one.

If you don’t need branches, it’s because merging is too painful in older SCMs. Branches in git are just a pointer to a commit and remains in place in the file system. Thus, feature or personal branches is the way to go. Even if you work alone on a project. There is no magic, only Git. There is no magic, only Git.

Posh-git is a good CLI for git on Windows.

Tags is also a pointer to a commit, but stays in place. Perfect for tagging releases. They can now be created from the History view in Visual Studio 2015.

Phil thinks rebase should be called graphing. Creating a linear history instead of the messy, branched real world. And you can rebase directly from Visual Studio 2015.

Visual Studio 2015 supports graphical merge, even in git. The conflict window only shows the conflicts, not the changes that worked.

Use pull request for merging into master and get a code review at the same time. This is best practice within Microsoft.

Microsoft and GitHub both enforces two factor authentication.