diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2017-06-01 07:10:14 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2017-06-01 07:10:14 +0300 |
commit | 8ae640638d214864ccbc8799815739e02dfa734d (patch) | |
tree | d6d066074739274344e95bfe0c561d6a18ff8904 /%HOME%/.bash_utils | |
parent | git.sh: refactoring (diff) | |
download | linux-home-8ae640638d214864ccbc8799815739e02dfa734d.tar.gz linux-home-8ae640638d214864ccbc8799815739e02dfa734d.zip |
add branch_fixup_committer_date
This routine sets every commit's "commit date" to its "author date".
It's really useful for me, given the amount of history rewriting I do
routinely.
Diffstat (limited to '%HOME%/.bash_utils')
-rw-r--r-- | %HOME%/.bash_utils/git.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/%HOME%/.bash_utils/git.sh b/%HOME%/.bash_utils/git.sh index 361d16e..77c9193 100644 --- a/%HOME%/.bash_utils/git.sh +++ b/%HOME%/.bash_utils/git.sh @@ -144,3 +144,8 @@ branch_backup_dropbox() ( branch_backup "$USERPROFILE/Dropbox/backups" ) + +branch_fixup_committer_dates() ( + set -o errexit + git filter-branch --env-filter 'export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"' +) |