Version control provides us with a way to save and backup our code to a repository. I really liked this article listing reasons why source control is important — even as a solo developer.
In this post, I will show you how to start tracking changes in your code using git
and how to store and manage your code in GitHub. This workflow will apply to any local project you may want to set up with git.
Getting Set Up
git
Verify you have git by opening a terminal and typing git --version
. If you don't already have git installed, you can download the appropriate version for your OS here: git-scm.com/downloads.
Before we can start using git, we need to add our user information to the gitconfig file using the following commands