step three – git to know version control

Pun intended. 🙂

I picked up Git a few months ago and it took a couple of weeks to wrap my head around the concept. Git is one of those things, that once you get the feel of it, you won’t ever want to stop using. Allow me to share my experience and show you what you can get out of it.

Key takeaway:

  • Git may slow you down at the beginning, but gives you a great advantage when you start sharing and work with others.
  • Git allows a whole team working on the same project without blocking each other.
  • Git gives you the freedom to work on new things. Eliminates the risk of spending much time reverting complex changes if the original direction was not great.
  • Using Git is a must if you take network automation seriously.

“Copy of Document_v1.1_final_latest.docx”

Generally document storage and organisation have always been been a challenge since computers crawled into the offices. Shared drives, SharePoint, Dropbox, Box, etc. are all try to address this issue. One thing is common in these products – they only perform well if everyone uses them according to the same principles. And it takes effort to use them well. It’s so easy to keep something in your local drive and attach it to emails instead of logging into a web portals, uploading and grabbing a links from there.

The real problem

Documents could be very dynamic. Incorrect document handling creates great problems.

Assumptions causing extra work. You got a spreadsheet with IP allocations 2 weeks ago, how do you know you have the latest version? You could create a Visio using those IPs, that may already be incorrect at the time when you just created. Share this with others and the work and confusion just spirals even further.

Delays mean hidden costs. You ask someone to forward you something, but the person may be busy or out of office. It causes delay of the delivery.

Clashes mean even more work. Imagine that you and your colleague modified the same Visio file. Merging them could be very very painful! You need to check it out and to stop others changing the document – if they are following the rules.

Document handling in general only works with great culture. This is even more true for code.

Git in a nutshell

With Git, you can track changes of text based files (typically). You can create snapshots (commits or branches) of the state of the files at any point and move between those easily. You can safely make changes and revert if something went wrong. Or merge it with the master code base if your changes are acceptable. The code can be stored at a central location, but all contributors will have a local copy that can be synced with the central server when needed.

Screen Shot 2017-07-29 at 00.00.46

This comes very handy when you need to manage and share your code or keep track of changes of the network configuration.

Tweet: Network Automation only works if everyone is on board. Please click to share and help to create a Movement!

No time to waste!

If you ever looked at Git, you may found that it’s a bit overwhelming and complicated. That’s how I felt in the beginning. After some time and help from others I this is such a big part of my every day life and it’s the basis of any automation work I am doing. Let me show you a few reasons why it’s worth investing your time and effort int learning Git.

  1. You write a few scripts that others’d also like to use. The script may change often. Git is a great way to share the code and can easily be synced with others. You may say you could also keep it on a shared drive. Maybe. But git log could inform others about the recent changes without spending too much time on documentation.
  2. If someone contributes to your quickly evolving scripts, managing the changes would be a real headache! Especially if you happen to change the same file or even the same line. Sitting there and comparing files every time you would like to incorporate each other’s work is a nightmare and a waste of time. Coding is about faster solutions. Why slow it down with manual comparison?
  3. You started working on a new feature, but it seems that you took a left turn at some point and changed a few things and you figured it was not the best idea. With Git you can revert to a known-good state with 1-2 commands.
  4. If you ever apply for a job at a company, where network automation is taken seriously, learning git will be inevitable. Plus it’s a great advantage in the interview process if you know it already.

Other revisioning tools

Of course, Git is not the only revisioning tool. I need to mention SVN or Mercury (hg) as well and they can also be used for the same purpose. I use Git as it’s widely adopted. Many open source projects are in GitHub, so you can easily check out and even contribute using it.

what shall I do next?

Check out one of the interactive git tutorials. You may want to checkout codeacademy.

If you have any project, add it to a local git repository at least and start creating commits whenever you hit a small milestone.

Create a free git account at GitHub. (Warning! Be careful what you store in there! No-no for passwords and any work-related code or file could be very sensitive.)


Be smart. Use git.

Don’t miss out and stay motivated by subscribing to email alerts (on the right hand side on desktop or at the bottom on mobile device) or like our Facebook page.

Till next time…


4 thoughts on “step three – git to know version control

  1. Yesterday two of our developers introduced Microsoft team foundation to our network engineers, they started by saying, this is for developers, you do not need this. and presented gitflow. the developers are good and had good intentions, however, the network engineers felt that this is difficult and they should not bother with it. hence, I was looking for a simple resource to describe git for network engineers. Keep up the good work.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s