Skip to content

Instantly share code, notes, and snippets.

@slugbyte
Last active April 4, 2016 19:09
Show Gist options
  • Select an option

  • Save slugbyte/c8977df45b8ca8c8c8666f174115b6d8 to your computer and use it in GitHub Desktop.

Select an option

Save slugbyte/c8977df45b8ca8c8c8666f174115b6d8 to your computer and use it in GitHub Desktop.

git team workflow

when you start a new feature...

  • start from an uptodate master branch
  • git checkout master
  • git pull origin master
  • do work and add, commit, and push
  • git add <file>
  • git commit -m <useful message>
  • git push origin <feature_branch_name>
  • IF A PULL REQUEST FROM ANOTER FEATURE IS MERGED TO MASTER
  • commit changes to your feature branch
  • git add <file>
  • git commit -m <useful message>
  • update you local master branch
  • git checkout master
  • git pull origin master
  • update your feature branch with changes in master
  • git checkout <feature_branch_name>
  • git merge master
  • handle merge conflicts if there are any
  • git commit -m "merged master"

When you are done with your featrue..

  • make sure you have no changes to commit
  • git status
  • git add <file>
  • git commit -m <useful message>
  • update you local master branch
    • git checkout master
    • git pull origin master
  • update your feature branch with changes in master
  • git checkout <feature_branch_name>
  • git merge master
  • handle merge conflicts if there are any
  • git commit -m "merged master"
  • update your feature branch on github
  • git push origin <feature_branch_name>
  • create a pull request
  • have a merge party
  • walk over all the changes in your code with your team
  • show them a demo of your branch and prove to them it works
  • decited as a team to merge or not to merge the feature branch
  • IF YOU MERGE THE FEATURE BRANCH EVERYONE SHOULD UPDATE THERE CURRENT FEATURE BANCHES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment