Skip to content

GitHub Etiquette

jxturtle edited this page Oct 10, 2017 · 2 revisions

Master branch is the main branch that has the stable build.

To prevent the master branch from being broken, the following workflow is recommended.

  • For individual development, create a separate development branch.
  • All branches should branch out from master.
  • Commit all the changes on the development branch.
  • Before working, checkout to master and pull from it to ensure local branch is up to date.
  • Checkout to your own development branch and merge.
  • If there is merge conflicts, resolve them.
  • Commit the merge on the development branch and push the changes.
  • If the changes are good to go, commit to master.

Git commands

  • New local branch: git checkout -b
  • Swap local branch: git checkout
  • Pull: git pull origin
  • Merge: git merge (on your branch)
  • Commit: git checkout (checkout to correct branch if not done so earlier) git add . git commit -m "your message" git push

MAKE SURE MERGE CONFLICTS ARE RESOLVED BEFORE COMMITTING TO THE MASTER

Clone this wiki locally