In Github, you should work with branches in order to avoid errors. Our project will have 3 fixed branches, but you can create as many as you want in order to implement your own features that could, maybe, produce errors to the others. Our fixed brunches will be:
develop
. Where everybody will work together and save their changesrelease
. Where the tested code that works, goesmaster
. The final and definitive branch. If something fails there, we are kind of fucked up.
Our repo will be at:
https://github.com/Gonaco/mtp_protocol_A
Take into account that a branch is not available to others unless you push the branch to your remote repository (line 2 of the code below)
git checkout -b feature_DJ_JJ_Branch_This_is_the_name_of_the_Branch_and_yes_JJ_is_Jorge_Jorge
git push origin feature_DJ_JJ_Branch_This_is_the_name_of_the_Branch_and_yes_JJ_is_Jorge_Jorge
In fact, you should do this before starting to work the first time
git checkout develop
git branch -d feature_DJ_JJ_Branch_This_is_the_name_of_the_Branch_and_yes_JJ_is_Jorge_Jorge
git merge develop
http://rogerdudler.github.io/git-guide/
ALERT: Note that the push you should normally use is the following
git push origin develop
because our changes should go to that branch first. Do not use git push origin master