Last active
January 17, 2024 18:34
-
-
Save itse4elhaam/864a607e862c1adaf578ff00f480dfab to your computer and use it in GitHub Desktop.
Git aliases
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] | |
ac = !git add -A && git commit -m | |
acp = "!f() { git add -A && git commit -m \"$1\" && git push origin $(git symbolic-ref --short HEAD); }; f" | |
pom = push origin master | |
po = push origin | |
pl = pull origin | |
st = status -sb | |
s = status | |
co = checkout | |
br = branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate | |
ll = log --oneline | |
last = log -1 HEAD --stat | |
fo = fetch origin | |
fa = fetch --all | |
rh = reset --hard | |
plc = "!git pull origin $(git symbolic-ref --short HEAD)" | |
poc = "!git push origin $(git symbolic-ref --short HEAD)" | |
cbr = "!f() { echo 'Current branch:' && git rev-parse --abbrev-ref HEAD && git rev-parse --abbrev-ref HEAD | $(command -v clip || command -v xclip || command -v pbcopy); }; f" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment