Created
January 12, 2023 08:57
-
-
Save ben-xD/99792a89579d790914849fefb399448d to your computer and use it in GitHub Desktop.
Git aliases
This file contains 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
... | |
# Aliases adapted from https://snyk.io/blog/10-git-aliases-for-faster-and-productive-git-workflow/ and http://blog.kfish.org/2010/04/git-lola.html | |
[alias] | |
# Logging | |
s = status | |
l = log --pretty=format:\"%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) [%an]\" --abbrev-commit -30 | |
lol = log --graph --decorate --pretty=oneline --abbrev-commit | |
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all | |
new = log origin/main@{1}..origin/main@{0} | |
newd = log origin/develop@{1}..origin/develop@{0} | |
c = commit -v | |
co = checkout | |
cod = checkout develop | |
com = checkout main | |
cob = checkout -b | |
del = branch -D | |
br = branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate | |
p = push origin HEAD | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment