Getting and Creating Projects
git commit -m "{commit message}"
git reset --hard HEAD
git reset --hard HEAD^
git reset --hard HEAD~{the number of commits}
git branch -m {new branch name}
git checkout {branch name}
git checkout -t {remote name}/{branch name}
git checkout -b {branch name}
git checkout -D {branch name}
- git stash save (deprecated)
+ git stash push
Sharing and Updating Projects
git push -u {remote name} HEAD
git push {remote name} :{branch name}
git push {remote name} --delete {branch name}
git remote add {remote name} {remote url}
git remote set-url {remote name} {new remote url}
Inspection and Comparison
git rebase -i HEAD~{the number of commits}