Last active
July 29, 2021 13:39
-
-
Save aeinbu/d98f58c3bb3c717511c17216fb68d4a8 to your computer and use it in GitHub Desktop.
Some practial aliases for Git
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] | |
refresh = !git fetch --all --prune && git checkout master && git pull --rebase && git lastbranch | |
amend = commit --amend --no-edit | |
lastbranch = checkout @{-1} | |
ql = log -10 --oneline --decorate --graph | |
qb = "!qb(){ git refresh && git checkout -b aei/PPN-$@; }; qb" | |
qc = "!qc(){ git checkout aei/PPN-$@; }; qc" | |
qa = "!qa(){ git refresh && git branch --remote | grep $@ | sed 's/origin\\///' | xargs git checkout && git pull --rebase && git rebase master; }; qa" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Creating an alias using git commands:
git config alias.amend "commit --amend --no-edit"
Note the use of quotes around multi word expressions.
Removing a git alias:
Edit the configuration file in a texteditor
Or use you favorite editor to edit the ´.gitconfig´ in the user's home folder.