Skip to content

Instantly share code, notes, and snippets.

@mrpandat
Last active August 2, 2022 14:28
Show Gist options
  • Save mrpandat/677c300155b7a6dc1342155fc4d63f72 to your computer and use it in GitHub Desktop.
Save mrpandat/677c300155b7a6dc1342155fc4d63f72 to your computer and use it in GitHub Desktop.
git
[alias]
co = checkout
br = branch
cm = commit -m
st = status
rsh = reset --soft HEAD^1
rhh = reset --hard HEAD
pushf = push --force-with-lease
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
rcm = "!f() { \
cm=$(git log --oneline --format=%B -n 1 HEAD); \
git rsh ; git add . ; git cm \"$cm\" ; git pushf; \
}; f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment