Skip to content

Instantly share code, notes, and snippets.

@cfarm
Last active August 29, 2015 14:03
Show Gist options
  • Select an option

  • Save cfarm/80c953351da16604792c to your computer and use it in GitHub Desktop.

Select an option

Save cfarm/80c953351da16604792c to your computer and use it in GitHub Desktop.
Github Flow
  1. Create a new branch from master:

  2. git checkout master or git status to confirm you're working on master

  3. git branch my-new-branch

  4. Check out the new branch!!!

git checkout my-new-branch

  1. Make commits on this branch

  2. git add filename

  3. git commit -m "i edited a file"

  4. Push commits to remote repository (Github):

git push origin my-new-branch

This will create the branch on Github.

  1. When you're ready for the branch to be reviewed, it's PULL REQUEST TIME. Go to the repository and click the BIG GREEN BUTTON

  2. IF you can't merge through Github then you need to do it manually. Commands:

  3. git checkout master

  4. Then make sure you're up to date with git pull

  5. git merge my-new-branch

  6. git push origin master

  7. Once your Pull Request is approved and merged to master, you'll need to take an additional step to deploy it to the Client site by merging it to the production branch.

  8. git checkout production

  9. git merge master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment