1
0
mirror of https://github.com/aquatix/dotfiles.git synced 2025-12-06 21:45:10 +01:00

Useful Git aliases

This commit is contained in:
2020-02-22 11:21:31 +01:00
parent 16bd3d8597
commit 28dbd2d064

View File

@@ -33,6 +33,11 @@
# list aliases
la = "!git config -l | grep alias | cut -c 7-"
# git change-commits GIT_COMMITTER_NAME "old name" "new name"
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 "
# from https://help.github.com/articles/remove-sensitive-data
remove-file = "!f() { git filter-branch -f --index-filter \"git rm --cached --ignore-unmatch $1\" --prune-empty --tag-name-filter cat -- --all; }; f"
[push]
default = simple