Working with GitHub
Rule 1. No commits should be made directly to the master
branch.
Rule 2 All development is done in a branch off from the master
and named following this convention: <user>/<topic>
.
To create this new branch, run these commands:
$ git pull origin master
$ git checkout -b <user>/<topic>
When done making the changes locally, push your branch to the server (make sure to sync with the remote first).
$ git pull origin master
$ git push origin <your branch>
Rule 3. To merge a new branch into the master
branch, please open a pull request (PR).
Rule 4. When a branch is merged into the master
, it must be deleted from the remote repository.
# Delete local branch
$ git branch -d <your branch>
# Delete remote branch
$ git push origin --delete <your branch>