Skip to content

Instantly share code, notes, and snippets.

@phil-monroe
Created October 28, 2015 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phil-monroe/a66937704c5015078729 to your computer and use it in GitHub Desktop.
Save phil-monroe/a66937704c5015078729 to your computer and use it in GitHub Desktop.
# 0) do only if you done have the code
git clone REPO_URL
# 1) pull latest master
git checkout master
git pull origin master
# 2) create new branch.
git checkout -b feature/foobar
# 3) do work and commit logical chunks/checkpoints!
# Do Work
git add FILES
git commit -m "Got it too foo..."
# Do more work
git add FILES
git commit -m "Now it bars!"
# 4) push your local changes to github and open pull request + discuss
git push origin feature/foobar
# Open PR on github.com
# 5) do more work and commit since usually don't get it perfectly the first time
# Do more work
git add FILES
git commit -m "forgot it needs to baz aswell!"
# 6) once everything looks good, merge your pull request. This moves your changes from your feature branch into master
# Do this on github.com
# this does a merge from "feature/foobar" into "master" and your changes are now apart of the mainline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment