Update from updated-inputs-2024-07-14-01-03
This commit is contained in:
commit
df0ed63fa9
@ -20,25 +20,25 @@ xgit_merge_theirs() {
|
||||
|
||||
# create a merge commit between base branch and other branch, so it shows up correctly in git log
|
||||
# we use `ours` so we make sure there are no merge conflicts
|
||||
git merge -s ours "${OTHER_BRANCH}" -m "${COMMIT_MESSAGE}"
|
||||
xgit merge -s ours "${OTHER_BRANCH}" -m "${COMMIT_MESSAGE}"
|
||||
|
||||
# save our newly created merge commit in a seperate branch
|
||||
git branch "${TEMP_BRANCH}"
|
||||
xgit branch "${TEMP_BRANCH}"
|
||||
|
||||
# export contents of other branch to current working directory
|
||||
# this will change the last commit of our base branch too
|
||||
git reset --hard "${OTHER_BRANCH}"
|
||||
xgit reset --hard "${OTHER_BRANCH}"
|
||||
|
||||
# return to our merge commit from the base branch
|
||||
# but without touching the current working directory
|
||||
git reset --soft "${TEMP_BRANCH}"
|
||||
xgit reset --soft "${TEMP_BRANCH}"
|
||||
|
||||
# Add the changes to our merge commit
|
||||
git commit --amend --no-edit
|
||||
xgit commit --amend --no-edit
|
||||
|
||||
# we are now on our base branch again
|
||||
# so we can delete the temp branch
|
||||
git branch -D "${TEMP_BRANCH}"
|
||||
xgit branch -D "${TEMP_BRANCH}"
|
||||
}
|
||||
|
||||
NOW="$(date --utc +%Y-%m-%d-%H-%M)"
|
||||
|
Loading…
Reference in New Issue
Block a user