How To Developer : Git
Install
- For Windows OS, download and install Cygwin1.
- Download and install the latest Git SCM2 for your operating system.
- Open a Terminal (For Windows OS use Cygwin or Git Bash) and run the following commands to configure your Git username and email. These details are important because they will be associated with any commits that you create.
$ git config --global user.name "Titi Dupond" $ git config --global "[email protected]"
- Many Git servers authenticate using ssh public keys. Check to make sure you don’t already have one. By default, a user’s ssh keys are stored in that user’s
~/.ssh
directory. You can easily check to see if you have a key already by going to that directory and listing the contents.$ ls ~/.ssh id_rsa id_rsa.pub known_hosts
- Generate an ssh key if you dont have one with the following command.
$ ssh-keygen -t rsa -C "[email protected]"
Sign up into your Git Server (GitHub or GitLab) and add your public ssh key from the public file (id_rsa.pub) to the SSH Keys management tool.
If your network is behind a proxy and git clone command don't work, you may need to configure Git to use a proxy3.
1. Cygwin Installation, Cygwin, https://cygwin.com/install.html ↩
2. "Git SCM Downloads" , Git SCM, https://git-scm.com/downloads ↩
3. "Configure Git to use a proxy", GitHub documentation, https://gist.github.com/evantoli/f8c23a37eb3558ab8765 ↩