aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/%HOME%
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2017-06-01 07:10:14 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2017-06-01 07:10:14 +0300
commit8ae640638d214864ccbc8799815739e02dfa734d (patch)
treed6d066074739274344e95bfe0c561d6a18ff8904 /%HOME%
parentgit.sh: refactoring (diff)
downloadlinux-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%')
-rw-r--r--%HOME%/.bash_utils/git.sh5
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"'
+)