Documentation about the workflow with git for collaboration.
All steps below must have semantic and understandable names and/or descriptions
- Move to master:
git checkout master
- Update working directory:
git pull
- Create a branch:
git checkout -b my-feature
(if exist just move to itgit checkout my-feature
) - Start coding
- At the end of each day or task
- Add relevant files:
git add relative_folder/my-file-1.ext
git add relative_folder/my-file-2.ext
- Commit:
git commit -m "A semantic short message that describes the task"
(for each single tiny task separately) - Push branch:
git push origin my-feature
- Repeat this process every day to avoid data loss
- Add relevant files:
- At the beginning of each day or task
- Perform first 2 steps
- Move to your branch:
git checkout my-feature
- Update you branch from master:
git merge master
- If you have conflicts, resolve then and commit in your branch
- If feature is done
- Perform step 5
- Create a Pull Request
- After any push of new branch, github will show an option to compare and pull request that branch with master
- For each pull request, another member of the developer team must permorm a code and functional reviews with the owner
- Once the reviewer approves the changes, the pull request can be merge to master