$git init
$ssh-keygen
$ssh-add ~/.ssh/id_rsa
$git remote add origin SSH_URL_FROM_GITHUB
Set a ssh config file
$cat > ~/.ssh/config
Host github.com
Hostname github.com
AddKeysToAgent yes
IdentityFile ~/.ssh/id_rsa
(CTRL+D)
Set a basic path
$cat >> ~/.bash_profile
alias la='ls -a'
alias ll='ls -l'
HOME=/d/webhome/
HOMEDRIVE=D:/
HOMEPATH=\webhome
cd
(CTRL+D)
Avoiding ssh passphrase prompt
$cat >> ~/.bash_profile
eval `ssh-agent -s`
ssh-add ~/.ssh/*_rsa
(CTRL+D)
Patterned upload
$git checkout -b BRANCH_NAME
(coding)
$git status
$git diff FILENAME
$git add FILENAME
$git commit- m "COMMIT MSG FOR THE FILE"
$git push
(testing)
$git checkout master
$git merge BRANCH_NAME
(if needed)
$git branch -d BRANCH_NAME_TO_DELETE
Check commit id
$git log
Create a temporary branch to check old code
$ git checkout -b <temp_branch_name> <commit_id>
Going back to the current/final version
$ git checkout master
Rename a branch
$ git checkout BRANCH
$ git branch -m NEW_NAME
Cancel 'add'
$ git reset FILENAME
Check difference of an added file
$ git diff --cache FILENAME