Last active
March 7, 2019 12:42
-
-
Save betandr/10a7075f659f5658995e to your computer and use it in GitHub Desktop.
Git Config 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
co = git checkout | |
br = git branch | |
ec = git config --global -e | |
up = git pull --rebase --prune $@ && git submodule update --init --remote --recursive | |
cob = git checkout -b | |
cm = git add -A && git commit -m | |
save = git add -A && git commit -m 'SAVEPOINT' | |
wip = git add -u && git commit -m WIP | |
undo = git reset HEAD~1 --mixed | |
amend = git commit -a --amend | |
wipe = git add -A && git commit -qm 'WIPE SAVEPOINT' && git reset HEAD~1 --hard | |
bclean = f() { git branch --merged ${1-master} | grep -v ${1-master}$ | xargs git branch -d; }; f | |
bdone = f() { git checkout ${1-master} && git up && git bclean ${1-master}; }; f | |
bls = git branch -avva | |
bup = git remote update origin --prune | |
pushus = git push --set-upstream origin | |
pushmi = git push --mirror | |
rmc = git rm -r --cached | |
ll = git log --pretty=oneline --abbrev-commit | |
amend = git add --all && git commit --amend | |
pl = git log --graph --full-history --all --color --pretty=format:%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s | |
alias = git config --list | grep alias | sed s/^alias\.//g | sed s/=\!/\ =\ /g | |
change-commits = f() { VAR=$1; OLD=$2; NEW=$3; shift 3; git filter-branch --env-filter "if [[ \"$`echo $VAR`\" = '$OLD' ]]; then export $VAR='$NEW'; fi" $@; }; f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment