Freigeben über


Version Control with GIT for MP Authors – part 1

 Foreword to all Developers and Version Controls Pro’s:
Please don’t laugh too much and have mercy with me  :). This post is about an IT Pro trying to explain other IT Pro’s stuff he does not fully understand. Any comments, corrections to my statements and hints for improvement are highly appreciated.

This is the first part of a multi-part series about how we can leverage GIT as a Distributed Version Control System (DVCS) for authoring SCOM Management Packs with Visual Studio Authoring Extensions (VSAE). This first part talks about my motives and provides some general information.

Why do I need Version Control for MP authoring?

You don’t, but it can make your life (much) easier once you understand at least the basics and can handle the tools… So what are the benefits of a Version Control System (VCS)?
With a proper VCS you can:

  • Store different development milestones by committing changes to the VCS. Think of them as Windows Restore points…
    That allows you to easily revert to a previous state (commit).
    Wait a second, can I use that for backing up my MP projects? Hmm, I think the “official” answer is no, but by creating multiple commits and store them on a central server (which gets backed up regularly) you are really getting some kind of backup.
  • You can easily track changes and answer questions like: What has changed between version 1.0.0.0 and 1.1.2.1?
  • Create multiple variations or branches of your MP, e.g. different versions of a single base version or just some different attempts to achieve a specific objective. You can then either maintain those different branches as separate strains of your MP or once you know which attempt was the best merge everything back to a single version.
  • Depending on the VCS you can work with multiple persons on your MP project. Either simply share your code or really work together on the same MP. A good VCS supports you with this tasks and coordinates all members of your team.

The change tracking capability, the easy way of reverting things back to a previous change and the possibility to share work with colleagues were the decisive factors that I started thinking about VCS.

What is the best VCS? Which one should I choose?

Honestly, I cannot answer that, because I have no clue and I don't want to start a flame war :). There are a lot of VCS with different approaches, strengths and weaknesses available. Microsoft provides for a long time the Team Foundation Server (TFS), now also available as a service in Visual Studio Online.
But you might have noticed, that we have a current tendency to use another product called GIT. GIT is OSS and originated from the Linux Kernel Hacker community. An increasing number of our own products gets primarily published on a central GIT platform called GITHub. One of my favorite example is the PowerShell module for Microsoft Azure (see here).
So I decided to use GIT because

  • Visual Studio and Visual Studio Online fully supports GIT so it is easy to use.
  • GIT is a DISTRIBUTED VCS, meaning that you can use it locally (e.g. for your own personal use) and also in combination with GIT installation from other colleagues (like a peer to peer system) or in conjunction with a central server like GITHub or Visual Studio Online.
  • It is quite easy to install and works on all Operating Systems and it even has a portable version.

GIT it is, so how can I get more information?

GIT is very well documented. Wikipedia provides a very good brief overview . Then there is an excellent free book about GIT available . But be warned: reading this book might scare most of you to death like it did to me.

  So I try to give you the fast path with this blog post series.

GIT installation on Windows

To prepare for the real interesting stuff we have to install GIT and Visual Studio 2013/2015 with VSAE (there are many blog posts available about VS and VSAE installation, so I skip this part). You can download all Windows versions of GIT for free here. You will need to download the most current version of GIT in the right version (32/64 Bit) for your system. The latest release (2.7.4 at the time of writing) supports the automatic installation of a very handy tool, the GIT Credential Manager (GCM), right with the regular GIT package. If you use an older version, you have to download and install the GCM as well.

The installation itself is pretty straight forward. Simply execute the .EXE and use these options:

GIT Installation  GIT Installation GIT Installation  GIT Installation  GIT Installation

Now you might think: “I trust your statement with using a VCS and I follow you installing GIT on my box, now what?”
Great! In the next post I will explain how GIT is working and can be used, so stay tuned!

Isn’t that called a cliff-hanger?

Comments

  • Anonymous
    September 04, 2016
    Thanks Dirk, well explained. I am working on SCOM last 3 Year. I want to learn SCOM in dept so review and read you all blocks. Please keep in post for future doc and articles. Thanks again.