mirror of
https://github.com/sahinakkaya/til.git
synced 2024-12-22 07:09:39 +01:00
TIL: Rebasing without overwriting commit dates
This commit is contained in:
parent
7bd87c82a7
commit
48074f4ba8
10
git/rebasing-without-overwriting-commit-dates.md
Normal file
10
git/rebasing-without-overwriting-commit-dates.md
Normal file
@ -0,0 +1,10 @@
|
||||
When you do
|
||||
|
||||
```
|
||||
git rebase -i commitish
|
||||
```
|
||||
and edit some commits, you will recreate the history hence all the commits coming after edited one will have the same date and time. If you don't want this behaviour here is the trick:
|
||||
```
|
||||
git rebase --committer-date-is-author-date -i commitish
|
||||
```
|
||||
Note that you need git version 23.19 or greater to do this in interactive mode.
|
Loading…
Reference in New Issue
Block a user