1
Fork 0

git: tidy

This commit is contained in:
Alan Faubert 2018-10-10 05:39:20 -04:00
parent 549d75fb63
commit bf399cbc1b
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
[alias]
clean-branches = !git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D
clean-dates = filter-branch --env-filter 'GIT_COMMITTER_DATE=$GIT_AUTHOR_DATE' --
clean-dates = filter-branch --env-filter 'GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"' --
clean-original = !git show-ref | grep ' refs/original/' | cut -d ' ' -f 2 | xargs -n 1 git update-ref -d
clean-permissions = !git -c core.filemode diff -R | grep -E '^(diff|(old|new) mode)' | git apply
clean-user = !git filter-branch --env-filter 'GIT_AUTHOR_EMAIL="$(git config --get user.email)" GIT_AUTHOR_NAME="$(git config --get user.name)" GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL" GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"' --

View File

@ -1,6 +1,6 @@
# Git Config
This `.gitconfig` does not include a default identity for commits. It does define a few aliases though:
## Aliases
- `git clean-branches` - delete local branches that track remote branches that have been deleted
- `git clean-dates` - set all committer dates of all commits in the given range to their author dates