Skip to content

Commit

Permalink
Merge commit '25b02d99f68cb00a6713acbe6234383807f382ee'
Browse files Browse the repository at this point in the history
  • Loading branch information
therightstuff committed Oct 17, 2024
2 parents cf11639 + 25b02d9 commit 4128631
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# sandbox-repo

test repo for playing around with git and github
15 changes: 15 additions & 0 deletions add_parent.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
# add a parent commit to the specified commit, ideal
# for establishing the other parent of a squashed merge
# lifted from https://stackoverflow.com/a/41243690/2860309

# usage: ./add_parent.sh TARGET_COMMIT_ID NEW_PARENT_COMMIT_ID

set -ex

target_commit=$1
additional_parent=$2

git replace --graft $target_commit \
$(git show --pretty=%P $target_commit | head -n1) \
$additional_parent

0 comments on commit 4128631

Please sign in to comment.