Skip to content

Commit

Permalink
solve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
lwaekfjlk committed Mar 14, 2024
1 parent f6e1097 commit 95dacf6
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions run_git.sh
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

0 comments on commit 95dacf6

Please sign in to comment.