Documentation for the MSDV GitHub workflow.
-
Initial setup:
-
In the local clone of your fork, create a branch for your edits.
git branch mybranch
creates a branch named mybranch
git checkout mybranch
switches to the branch mybranch- Do all your work in this branch.
- Push your branch to the forked repo early and often.
- Never work in the
master
branch!
-
Pull in changes often from the
upstream master
to keep it synced so that when you prepare your pull request, merge conflicts will be less likely. Again, never work in themaster
branch! -
Merge the fork master into the fork branch and, if applicable, resolve any merge conflicts.
git merge <branch>
merges the specified branch into the current branch. -
When you are ready for your contributions to be considered, open a Pull Request in GitHub. The Pull Request should be for the up-to-date branch of your fork. Prior to submitting the Pull Request, make sure you have:
- Synced the fork master with the latest version of the upstream master (#3).
- Merged the fork master to the fork branch and resolved any merge conflicts (#4).
Use GitHub issues to log problems and communicate.
Sometimes, you mess up and need to go back to a previous commit. Use revert
. Do not use reset
! Here's a helpful Stack Overflow answer.