Compare commits
No commits in common. "df0ed63fa98eea34c0c0d6eb73179199a7099792" and "d2824f259e650e163a16c27fba0de4828fd52891" have entirely different histories.
df0ed63fa9
...
d2824f259e
@ -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
|
||||
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
|
||||
xgit branch "${TEMP_BRANCH}"
|
||||
git branch "${TEMP_BRANCH}"
|
||||
|
||||
# export contents of other branch to current working directory
|
||||
# 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
|
||||
# but without touching the current working directory
|
||||
xgit reset --soft "${TEMP_BRANCH}"
|
||||
git reset --soft "${TEMP_BRANCH}"
|
||||
|
||||
# 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
|
||||
# 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)"
|
||||
|
Loading…
Reference in New Issue
Block a user