Common commands. Easy for future use.
git checkout HEAD -- my-file.txt
git fetch origin
git reset --hard origin/master
git log --pretty=oneline
a931ac7c808e2471b22b5bd20f0cad046b1c5d0d c
b76d157d507e819d7511132bdb5a80dd421d854f b
df239176e1a2ffac927d8b496ea00d5488481db5 a
git rebase --interactive HEAD~2
pick b76d157 b
pick a931ac7 c
pick b76d157 b
squash a931ac7 c
git fetch origin
git remote add new-origin [email protected]:user/repo.git
git push --all new-origin
git push --tags new-origin
git remote rm origin
git remote rename new-origin origin
git fetch -p && for branch in `git branch -vv | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done
.git/info/exclude
git rm -r --cached path_to_your_folder/
git config --global credential.helper osxkeychain
git commit --amend
git push origin develop:master
git push <remote> <local branch name>:<remote branch to push into>
git diff --staged
git stash push -m welcome_cart app/views/cart/welcome.thtml
git reset <file>
git reset # unstage all changes
git reset --soft HEAD~1