mirror of
https://github.com/aquatix/dotfiles.git
synced 2025-12-06 22:55:10 +01:00
Useful Git aliases
This commit is contained in:
@@ -33,6 +33,11 @@
|
|||||||
# list aliases
|
# list aliases
|
||||||
la = "!git config -l | grep alias | cut -c 7-"
|
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]
|
[push]
|
||||||
default = simple
|
default = simple
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user