Created
February 22, 2023 02:34
-
-
Save larsks/caf9e71e9bdf29ced8313dc177539eb2 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# Create the substitute of C | |
git update-ref refs/heads/main $(git log -1 --pretty=%B $C | GIT_AUTHOR_NAME=$(git log -1 --pretty=%an $C) \ | |
GIT_AUTHOR_DATE=$(git log -1 --pretty=%ad --date=iso $C) \ | |
GIT_COMMITTER_NAME=$(git log -1 --pretty=%cn $C) \ | |
GIT_COMMITTER_DATE=$(git log -1 --pretty=%cd --date=iso $C) \ | |
git commit-tree -p $A -p $B -F - $C^{tree}) | |
git update-ref refs/heads/main $(git log -1 --pretty=%B $D | GIT_AUTHOR_NAME=$(git log -1 --pretty=%an $D) \ | |
GIT_AUTHOR_DATE=$(git log -1 --pretty=%ad --date=iso $D) \ | |
GIT_COMMITTER_NAME=$(git log -1 --pretty=%cn $D) \ | |
GIT_COMMITTER_DATE=$(git log -1 --pretty=%cd --date=iso $D) \ | |
git commit-tree -p main -F - main^{tree}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment