Last active
April 7, 2021 06:42
-
-
Save EtsuNDmA/b30f46363d91a30b58f38be72986bd90 to your computer and use it in GitHub Desktop.
Aliases for git commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold cyan)<%an>%Creset' --abbrev-commit | |
ss = status -s | |
b = branch | |
ca = commit -a -m | |
last = log -1 HEAD | |
co = checkout | |
# fuzzy checkout by ticket number for branches like feature/cool-stuff-abc1234 | |
fco = "!f() { git branch -a | egrep -m1 \"(feature|hotfix)/.*${1}\" | sed \"s/remotes\\/origin\\///\" | xargs git checkout; }; f" | |
amend = commit --amend --no-edit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment