GIT provides clients for Linux, Windows, OSX, and this section takes Windows as an example of basic installation and configuration.
Tools Required: Msysgit, KDIFF3.
- Get Windows Installer on https://git-for-windows.github.io/
- Get Merge tool KDIFF3 on Http://sourceforge.net/projects/kdiff3/files/latest/download?source=files
Under any directory in Windows Explorer, right-click on git bash here and go to git command prompt.
To configure identity information:
$ git config--global user.name "John Doe"
$ git config--global user.email [email protected]
To configure the merge tool:
$ git config--global merge.tool kdiff
$ git config--global mergetool.kdiff3.path "Your path to Kdiff3.exe"
Configure SSH as prompted:
- Check if SSH is configured, and if configured, the following command will return several files similar to Id_rsa, Id_rsa.pub.
$ ls ~/.ssh
- Generate Public/private key. If prompted, skip the password to leave it blank.
$ ssh-keygen-t rsa-b 4096-c "[Email protected]"
- Make sure the ssh-agent is turned on.
$ ssh-agent-s
- Add private key to Ssh-agent.
$ Ssh-add ~/.ssh/id_rsa
- Copy the public key to the Clipboard and paste it into remote server profile.
$ clip < ~/.ssh/id_rsa.pub
For example, in GitHub you can find the SSH keys menu in profile->personal settings:
Now that the basic configuration is complete, you can use the preconfigured identity clone repository, commit the code, and more.
Begin using Git (Part1)-Git installation and configuration