Skip to content

Instantly share code, notes, and snippets.

@debasishg
Last active May 8, 2020 05:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save debasishg/be246467a934d461cf2c17b68547d35a to your computer and use it in GitHub Desktop.
Save debasishg/be246467a934d461cf2c17b68547d35a to your computer and use it in GitHub Desktop.
Git tidbits
Keeping a remote fork in sync
-----------------------------
git status
git checkout master
git remote -v
git remote add upstream https://github.com/lightbend/cloudflow.git
git remote -v
git fetch upstream
git pull upstream master
git push origin master
Take ownership of a PR from another user
----------------------------------------
github user : skonto
PR branch : port-blueprint-verification
git remote -v
git remote add skonto https://github.com/skonto/cloudflow.git
git fetch skonto port-blueprint-verification
git branch --track port-blueprint-verification skonto/port-blueprint-verification
git checkout port-blueprint-verification
git add / commit .. # make changes
git push skonto port-blueprint-verification
# check PR updated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment