What is Version Control?
Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later. Many of us constantly create something, save it, change it, then save it again. Version (or revision) control is a means of managing this process in a reliable and efficient way. Especially important when collaborating with others.
What is Git?
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Created by the same people who developed Linux. The most popular implementation of version control today. Everything is stored in local repositories on your computer. Operated from the command line.
Go to the following website and click on the download link for your operating system (Mac, Windows, Linux, etc):
Once the file is done downloading, open it up to begin the Git installation.
Unless you really know what you are doing, just go with the default options at each step of the installation. Once the install is complete, hit the “Finish” button ( you may want to uncheck the box next to “Review ReleaseNotes.rtf”)
Open Git Bash
Find a program called Git Bash, which is the command line environment for interacting with Git. It should be located in the directory into which Git was installed (or, for Windows users, in the Start Menu)
Once Git Bash opens, you’ll see a short welcome message followed by the name of your computer and a dollar sign on the next line. The dollar sign means that it’s your turn to type a command.
Configure Username and Email
Each commit to a Git repository will be “tagged” with the username of the person who made the commit. Enter the following commands in Git Bash, one at a time, to set your username and email:
$ git config –global user.name “Your Name Here”
$ git config –global user.email “firstname.lastname@example.org”
You’ll only have to do this once, but you can always change these down the road using the same commands.
Now type the following to confirm your changes (they may be listed toward the bottom):
$ git config –list
Go ahead and close Git Bash with following command:
Now that Git is set up on your computer, we’re ready to move on to GitHub, which is a web-based platform that lets you do some pretty cool stuff. Once GitHub is up and running, we’ll show you how to start using these tools to your benefit.
I wish you plenty of gain plenty of code.
Java Software Trainer