Skip to content

Instantly share code, notes, and snippets.

@nyrahul
Last active March 14, 2022 15:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nyrahul/4e0f3e0f1574a85a48c0e6bb65f7fac2 to your computer and use it in GitHub Desktop.
Save nyrahul/4e0f3e0f1574a85a48c0e6bb65f7fac2 to your computer and use it in GitHub Desktop.
git commands
# 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