Git Workflow - WeRecycle/RhodyCode GitHub Wiki

Basic workflow:

  1. Branch off of develop (usually):

    git branch branch-name #creates branch called branch-name off of working branch
    git checkout branch-name #makes branch-name working branch
    
  2. Add changes and commit:

    git add /my_files #adds all files in directory my_files, alternatively use . to add all files
    git commit -m "commit message describing changes"
    
  3. Push to github:

    git push -u origin branch-name #use this to push branch for first time
    git push #use this to push branch after that
    
  4. Create pull request on github comparing branch to develop

  5. Code review and merge to develop

Ideally the branch master is used for any finished product that you would be willing to show people while develop is used for any working features that may not quite be ready or haven't been full tested.

So any new features go from feature-branch -> develop -> master