Installing Git is super easy to do. To be frank, I don't understand how anyone can do any work without it. This article explains the install for both the Ubuntu and Windows environments.
Install Git on Ubuntu
This is a quick one line command line. Installing just git-core should be enough:
sudo apt-get -y install git-core
However, if you are working on a larger project (like open source) you may have some special requirements, such as git-email (send packages through email), git-svn, git-doc (documentation), gitweb (repo in browser) and my personal favorite git-cola (Git GUI).
sudo apt-get install git-core git-cola git-email git-svn git-doc gitweb git-gui
I also have articles on gitlab and gitolite.
Install Git on Windows
I don't use windows for anything other than IE testing so this is not my area of expertise. But here is how I installed Git for windows.
- Go to http://msysgit.github.com/ and download the latest version.
- Double click the installer you just downloaded.
- You can "next" through all the default options.
There are a few things I recommend you do before you start.
Create a git folder
First thing you will want is a place to store all your git repositories (as you will likely be using more than one). I created the folder C:\git on my system, you may choose to make it in your My Documents depending on your setup and backups. I use the root of the drive as I find it easier to setup WAMP. In reality you could use both as git doesn't care were it is on your system.
Create a test repo
In your git folder create a new folder called testRepo. Go into testRepo and create a file Called README.txt (most git GUIs like gitlab and github automatically read your root readme file, so I would call this best practice).
Right click next to (or on) the readme file and choose "Git Init Here". Then right click again and choose "Git Add all files now".
We created a test repo so that we have something to select when we open git gui. Usually your exiting git repos will be on a unix machine protected by an ssh key so we are setting up a test repo to get access to the options of git gui.
Find your git folder in your start menu (on windowsXP it's Start > Programs > Git > Git GUI). This will bring up your git Gui which will ask what repo you want to use, Choose "Open Existing Repository". Browse to your testRepo folder and open it. You should see the "Readme.txt" Staged and ready to commit.
Generate SSH Key
In Git GUI, choose "Help" then "Show SSH Key". If this is your first time running you will need to "Generate Key". The key will then appear in the white space. This is the public key you will give to your system administrator or paste into gitlab or github.
Set Global config options
Open Edit > Options. On the right side there is a "Global" section enter your user name and email address there. Then click Save.
That's it your all setup. Now you just have to learn how to use git.