Last active
October 22, 2022 17:11
-
-
Save leosvelperez/8dfea5c5c620a72adb5980a32f09feb2 to your computer and use it in GitHub Desktop.
Useful 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
[alias] | |
a = add | |
ap = add -p | |
bd = branch -D | |
# Removes branches already merged | |
bdm = "!git branch --merged | grep -v '*' | xargs -n 1 git branch -d" | |
c = commit | |
cm = commit -m | |
co = checkout | |
cob = checkout -b | |
f = fetch -p | |
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --branches | |
p = push | |
pf = push --force | |
rba = rebase --abort | |
rbc = rebase --continue | |
rb = "!git fetch origin main:main && git rebase main" | |
rbdevelop = "!git fetch origin develop:develop && git rebase develop" | |
rbmaster = "!git fetch origin master:master && git rebase master" | |
rlc = reset HEAD~ | |
sf = "!git fetch --all --tags && git checkout main && git merge upstream/main && git push origin main --tags" | |
sfmaster = "!git fetch --all --tags && git checkout master && git merge upstream/master && git push origin master --tags" | |
st = stash | |
std = stash drop | |
stl = stash list | |
stp = stash pop | |
s = status -sb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment