Git Workflow - WeRecycle/RhodyCode GitHub Wiki
Basic workflow:
-
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
-
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"
-
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
-
Create pull request on github comparing branch to develop
-
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