Git

Types of Verson Control System

General Steps of Version Control

Git v.s. Others

Git store snapshots, not differences

Three stages

git_three_stages

Life Cycle of File in the Working Directory

git_lifecycle

Git Branching Model

long-term

short-term

read more

Tools

Misc

add and use ssh key

https://help.github.com/articles/about-ssh/

add
step1 : generate an SSH key and add it to the ssh-agent
step2 : add the key to your GitHub account

use
specify the ssh key to use for a given repo: git config core.sshCommand "ssh -i ~/.ssh/id_rsa"

save credential

If you’re using an HTTPS URL to push over, the Git server will ask you for your username and password for authentication. By default it will prompt you on the terminal for this information so the server can tell if you’re allowed to push.

If you don’t want to type it every single time you push, you can set up a “credential cache”. The simplest is just to keep it in memory for a few minutes, which you can easily set up by running git config --global credential.helper cache. For more information on the various credential caching options available, see Credential Storage.

Fork me on GitHub