1
0

Compare commits

..

No commits in common. "df0ed63fa98eea34c0c0d6eb73179199a7099792" and "d2824f259e650e163a16c27fba0de4828fd52891" have entirely different histories.

View File

@ -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 # 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 # we use `ours` so we make sure there are no merge conflicts
xgit merge -s ours "${OTHER_BRANCH}" -m "${COMMIT_MESSAGE}" git merge -s ours "${OTHER_BRANCH}" -m "${COMMIT_MESSAGE}"
# save our newly created merge commit in a seperate branch # save our newly created merge commit in a seperate branch
xgit branch "${TEMP_BRANCH}" git branch "${TEMP_BRANCH}"
# export contents of other branch to current working directory # export contents of other branch to current working directory
# this will change the last commit of our base branch too # this will change the last commit of our base branch too
xgit reset --hard "${OTHER_BRANCH}" git reset --hard "${OTHER_BRANCH}"
# return to our merge commit from the base branch # return to our merge commit from the base branch
# but without touching the current working directory # but without touching the current working directory
xgit reset --soft "${TEMP_BRANCH}" git reset --soft "${TEMP_BRANCH}"
# Add the changes to our merge commit # Add the changes to our merge commit
xgit commit --amend --no-edit git commit --amend --no-edit
# we are now on our base branch again # we are now on our base branch again
# so we can delete the temp branch # so we can delete the temp branch
xgit branch -D "${TEMP_BRANCH}" git branch -D "${TEMP_BRANCH}"
} }
NOW="$(date --utc +%Y-%m-%d-%H-%M)" NOW="$(date --utc +%Y-%m-%d-%H-%M)"