Last active
March 14, 2022 15:28
-
-
Save nyrahul/4e0f3e0f1574a85a48c0e6bb65f7fac2 to your computer and use it in GitHub Desktop.
git commands
This file contains hidden or 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
# Backporting to a branch by cherry-picking from the upstream/stable branch | |
git fetch upstream | |
git checkout upstream/v0.2 # verify if the tip is same as that of the branch you expect by comparing sha hash | |
git switch -c gke-cos-fix | |
git cherry-pick e2737efa975198efde13a48435cc994daa3ba018 # substitute with your commit of interest | |
git push origin gke-cos-fix # push the branch to your origin repo | |
# Go to github UI and raise PR to the v0.2 branch | |
# Pull PR locally and test | |
git fetch upstream pull/37/head:mybranch | |
git checkout mybranch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment