Skip to content

Instantly share code, notes, and snippets.

@Asimov4
Last active December 18, 2015 00:58
Show Gist options
  • Save Asimov4/5700116 to your computer and use it in GitHub Desktop.
Save Asimov4/5700116 to your computer and use it in GitHub Desktop.
git diff --cached
git pull --rebase
git rebase -i HEAD~4
git add -u
git commit --amend
git push origin fefc50f:mainline # to push a single commit
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"
git config --global alias.lgp "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit -p"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment