Workflow :
- Clone the master version of the app :
- git clone git@github.com:username/project.git
- If you need to check a different branch than the master, eg : dev
git checkout -b dev origin/dev
- type
git branch
to see which branch you are currently editing. It should now be dev.
- When you want to fix a bug the correct workflow seams to create a new branch in the dev branch :
git branch new_branch
git checkout new_branch
git branch
to see which branch you're in
- When your code is ready to be pushed to github :
- edit your files eg : vim blah.plop
- Add your changes to staging : git add blah.plop
- commit you changes git commit -m 'Message you want to say when you commit #reviewthis @gitusername @maraca email@ltd.com'
- By using the tag #reviewthis, it sends an email to the user - only if he has a public email address set up. email@company.com works too.
- git push origin master_branch will push your local commits to github.com and request code review to your peer reviews.
- Step before merging branch :
- Ask your peer reviews for a LGTM (looks good to me). Ask for TAL (take another look) until you get a LGTM.
- Fetch data from remote git server :
git fetch origin dev
- Write unit tests, run them, verify them don't break the code.
- Your data is now ready to be merged.
- git checkout into the repository you want to merge to : eg dev .
git checkout dev
git merge new_branch
- Resolved manually all the conflicts if there are any
- Commit your data
- Tag your merge: eg : v0.2.3
- Push your commits and tags
git push origin --tags
git push origin dev