Getting started with Git
Git has been part of my lexicon for a while, without me understanding exactly how to use it. For this post, I would like to provide an overview of Git, GitHub, and getting started with your first repository. For those new to the word (which is understandable when you are not a coder), Git is a distributed version control system (DVCS) for source code management - in plain words, think of it as software that helps you keep an essay that is constantly being written and updated under control. It knows about all your save states over time, and you can easily go back to any previous instance to continue your work.
The Linux community created Git in 2005 as a means to develop and maintain the Linux kernel within the open source community. Its main strengths are speed, simplicity, and a branching system for non-linear development. The branching system in Git is its core competitive advantage over other VCS. You can create as many branches (think branches in a tree) from your master branch as you want easily at low cost (time/resources), because Git stores your data as a series of snapshots. Each branch has its own snapshot in the project history. Therefore, when you create a branch, it’s easy to experiment with it, and if you decide to stop working on it, return to a previous snapshot of your content. If the branch develops into something substantial, it can merge with the master branch. And because branching is done by saving a small file containing pointers to the snapshot, precious time and resources are saved by not copying files to another directory as some other version control systems. For more info, I recommend the Pro Git book, which is available for free and has everything you need to know about Git.
Enter GitHub, a free(mium) web based hosting service for Git repositories that launched in 2008. It came to combine the powerful features of Git as a DVCS with a collaboration platform targeted to programmers, especially open source. Collaborators can follow each other, star (favorite) repos, and fork (copy) repos for you to work independently. GitHub encourages you to share your code with the community in an interesting way. When you sign up for a free account on GitHub, you can have an unlimited number of public repos with unlimited collaborators, only needing to upgrade when you must have private repos. Therefore, anyone can have a free GitHub account as long as you decide to share your code. When the tech world was hot with Social Networks such as Facebook and Twitter, GitHub came to create what would become the world’s largest social network of code repositories and its contributors. GitHub owns the code graph.
Why is Git and GitHub important to me, a non-coder? If your goal is to become a product manager but you lack the technical background (non-CS majors), it is important to understand the language, the culture, and the tools of engineers. I am re-learning how to code, thanks to the free courses on Udacity (CS101), Learn Python The Hard Way, and Coursera (Machine Learning), but there’s a certain limit on how much you can improve your skills based on classes/practice without real-world experience. It has been said that you can improve the quality of your programming by more than 50% from reading great code, and GitHub has made such task easily accessible and widely available.
Today I’m starting the first step in my journey into GitHub. I’m assuming that if you’re also interested in GitHub, there’s a programming language you’re working on and want to start using it. GitHub has a step by step tutorial on how to get started, but if that’s not enough there is plenty of help available for free, which I will list below:
Hand’s on “Try Git” course from Code School (highly recommended)
Git - the simple guide by Roger Dudler
The “Git Immersion” guided tour from New Context
The complete “Pro Git” book from the official Git site
Now, you’re ready to start using Git and reading some real code. A good place to start is https://github.com/github, or head to Stack Overflow or Quora for some advanced questions and recommendations.
If you need further help and you are willing to pay for it, you may find the following links also helpful:
Git Real from Code School (subscription required)
Git Essentials from Tuts+ Premium (subscription required)
When you become an advanced user, come back and check out How to GitHub from gun.io. Interested in using Dropbox as a Git repository? Check out awesome posts by Roger Stringer, Bradley Wright, and cantina.co.
Thoughts or comments? Let’s talk on Twitter
Gabriel Song