-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
# Define the commit range | ||
START_COMMIT="c8dfe91d6a17a8390d382affd187f9b162364e2f^" | ||
END_COMMIT="d22e560192616ba09fb5e7f0515b22491e7f44d9" | ||
|
||
# List all commits in the range, in reverse order if needed | ||
COMMITS=$(git rev-list --reverse $START_COMMIT..$END_COMMIT) | ||
|
||
for COMMIT in $COMMITS; do | ||
# Extract the author date of the commit | ||
AUTHOR_DATE=$(git show --format=%aD -s $COMMIT) | ||
|
||
# Cherry-pick the commit with the author date as the committer date | ||
GIT_COMMITTER_DATE="$AUTHOR_DATE" git cherry-pick -x $COMMIT | ||
|
||
# If cherry-pick is paused due to conflicts, resolve them and then continue with the following: | ||
git add . | ||
git commit -m "solve conflict" | ||
GIT_COMMITTER_DATE="$AUTHOR_DATE" git cherry-pick --continue | ||
done | ||
|