Configure global email
git config --global user.email "user@example.com"Configure global name
git config --global user.name "username"Generate SSH key
ssh-keygen -t rsa -C "user@example.com"View SSH key fingerprint
ssh-keygen -l -f ~/.ssh/id_rsa.pubAdd a remote repository
git remote add origin repo_url_hereRemove a remote repository
git remote rm originPush 'master' branch to remote repository
git push origin masterRename a local branch
git branch -m old_branch_name new_branch_nameDelete remote branch
git push origin :old_branchExclude files but include a specific file in .gitignore
*.rar #excludes all files ending in .rarTagging a commit (give the first 7 chars of the commit)
!myfile.rar #includes myfile.rar if present
git tag v1.0.0 dee70ed
git push origin --tags