Skip to content

Instantly share code, notes, and snippets.

@zgulde
Last active September 13, 2016 06:22
Show Gist options
  • Select an option

  • Save zgulde/27c29d27b01e31ffe0120233ac3e6015 to your computer and use it in GitHub Desktop.

Select an option

Save zgulde/27c29d27b01e31ffe0120233ac3e6015 to your computer and use it in GitHub Desktop.

git workflow for team projects

  1. Create a branch for the feature you will be working on and switch to it
git branch myname-feature-name
git checkout myname-feature-name
  1. work on your feature, add commit, etc

  2. Open a pull request to merge your branch back into master

git push origin myname-feature-name
  • open pull request from repo page on github.com

After a pull request has been merged we'll need to get our local git repository in sync with our remote

  1. Make sure you've commited any changes on your branch

  2. switch to the master branch

    git checkout master
    
  3. get your master branch up to speed with the remote

    git pull origin master
    
  4. switch back to your branch

    git checkout myname-feature-name
    
  5. merge the new changes

    git merge master
    

ghost commented Sep 13, 2016

Copy link
Copy Markdown

Thanks for formatting this so nicely Zach, I am referencing it in my sites internal coding standards :)

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