Created
March 16, 2020 23:09
-
-
Save neolit123/059f2e51dacb055bef21bb5aa0dcd6ae to your computer and use it in GitHub Desktop.
kwebsite-rebase
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
# `origin` is this repository, 'github' is the remote fork | |
# and '1.18-kubeadm-upgrade' is the remote branch | |
git checkout 1.18-kubeadm-upgrade | |
# create a patch between current PR branch and dev-1.18 | |
# results in '0001-kubeadm-update-upgrade-documentation-for-1.18.patch' | |
git format-patch dev-1.18 | |
git checkout master | |
# delete old branches | |
# at this point dev-1.18 was rebased remoteley and just pulling it locally | |
# would cause conflicts. | |
git branch -D dev-1.18 | |
git branch -D 1.18-kubeadm-upgrade | |
# fetch a new dev-1.18 | |
git fetch origin dev-1.18:dev-1.18 | |
git checkout dev-1.18 | |
git checkout -b 1.18-kubeadm-upgrade | |
# apply the patch | |
git am -3 0001-kubeadm-update-upgrade-documentation-for-1.18.patch | |
# 'git am' would fail, fix conflicts here | |
git add -u | |
git am --continue | |
# force push the local branch to the remote | |
git push -f github 1.18-kubeadm-upgrade |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment