mirror of
https://github.com/Erreur32/cheat.git
synced 2024-12-22 13:42:11 +01:00
Git cheats: Change date of existing commit
This commit is contained in:
parent
b477df20b2
commit
6cf69bc190
1 changed files with 8 additions and 0 deletions
|
@ -22,6 +22,14 @@ git commit --date="`date --date='2 day ago'`"
|
|||
git commit --date="Jun 13 18:30:25 IST 2015"
|
||||
# more recent versions of Git also support --date="2 days ago" directly
|
||||
|
||||
# To change the date of an existing commit
|
||||
git filter-branch --env-filter \
|
||||
'if [ $GIT_COMMIT = 119f9ecf58069b265ab22f1f97d2b648faf932e0 ]
|
||||
then
|
||||
export GIT_AUTHOR_DATE="Fri Jan 2 21:38:53 2009 -0800"
|
||||
export GIT_COMMITTER_DATE="Sat May 19 01:01:01 2007 -0700"
|
||||
fi'
|
||||
|
||||
# To removed staged and working directory changes
|
||||
git reset --hard
|
||||
|
||||
|
|
Loading…
Reference in a new issue