Skip to content

Instantly share code, notes, and snippets.

@samuelluis
Last active November 26, 2018 08:36
Show Gist options
  • Save samuelluis/202bfb5822e8c9e41042bcda13fb1025 to your computer and use it in GitHub Desktop.
Save samuelluis/202bfb5822e8c9e41042bcda13fb1025 to your computer and use it in GitHub Desktop.

Description

Documentation about the workflow with git for collaboration.

Steps

All steps below must have semantic and understandable names and/or descriptions

Feature or change
  1. Move to master: git checkout master
  2. Update working directory: git pull
  3. Create a branch: git checkout -b my-feature (if exist just move to it git checkout my-feature)
  4. Start coding
  5. 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
  6. 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
  7. If feature is done
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment