- Clone repo
git clone <repo>- Init new git repo
git init- Pull current version
git pull- Add to staging are
git add .- Remove deleted from staging area
git rm -r .- Commit
git commit -m "<msg>"- Upload to Github
git push -u origin master- Git branch
git branch- Git change branch
git checkout <branchname>- overwrite and pull
git fetch --all
git reset --hard origin/master- Edit git config
git config --global --edit- Git config
git config --global user.email "you@example.com"
git config --global user.name "Your Name"to set your account's default identity, Omit --global to set the identity only in this repository.
- Git stash
git stash- Local User
# put in .git/config
[user]
name = username
email = email@gmail.com