{{'2017-03-20T22:40:49.8588512Z' | utcToLocalDate }}
James Duggan

Establishing a git workflow with VSTS and Visual Studio

Here at we use VSTS backed by git repos. We have a wide range of ability in git and though some of us have being using git for several years, we are not git wizards. The this is git cartoon by the folks over at pretty much sums up my early experiences, which in turn enforced narrowing my use of git to a limited workflow and a preference of git bash over GUI.

And so, even though I’ve been using git for several years, I have only scratched the surface. When tasked with defining our workflow, I found I was unclear in my understanding around some aspects, and more importantly, being a git bash over GUI user, I struggle with the VS 2015 interface.

This is the first of a series of posts where I will use a very simple hello world sample to illustrate the key differences in git behaviour when using merge and rebase. I will also set out some improvements based on tools I have previously used and point out some unexpectedly good features in VS 2015.

The Hello World sample

The git repo sample used is available on Github as git_workflow_sample_setup. It is branched with a series of interleaved commits as shown


The code change within each commit is simple and yet as will seen even simple changes can go horribly wrong.


The initial commit C0 creates the Hello World program


The first commit on master simply adds a new hello world statement


The second commit on the branch creates a class to say hello world and does not change the main program body.


The third commit on master adds another hello world statement using a function


The fourth commit on the branch adds another hello world statement using the class previously created at C2.

comments powered by Disqus