Skip to content

Github Workflow

Lindsey Tulloch edited this page Apr 24, 2019 · 1 revision

Beware of rebase and reset. After performing either of these commands a git push --force-with-lease will be required to update your remote branch and of course, force push can be very dangerous. . .https://stackoverflow.com/questions/33247309/why-is-it-dangerous-to-do-a-force-push-against-a-remote-repository

  1. Fork the repo
  2. Clone your fork to a local directory git clone git@github.com:<your-user-name>/chloroplasts
  3. Set the upstream to onyiny-ang/chloroplasts git remote add upstream https://github.com/stroma-lamellae/chloroplasts or git@github.com:stroma-lamellae/chloroplasts.git
  4. hack hack hack hack
  5. Before making a pull request for a feature, bug fix, or other addition to the code base, rebase your code on top of the upstream master branch:
git fetch upstream
git rebase -i upstream/master

After this step there may be merge conflicts to resolve

  1. Once you have rebased your changes onto the upstream master branch, open a pull request against upstream/master (onyiny-ang/chloroplasts) with a brief description about your contribution.
  2. If you see an open pull request, take a few minutes to look through it and point out any errors (grammatical errors in the comments, logic errors in the code, other errors in the code).
  3. When someone has reviewed your PR, respond to and correct any issues and repeat from point #7.
  4. When your PR has received a LGTM (Looks Good To Me), squash any minor changes into a single commit: git rebase -i HEAD~<# of commits from opening pull request to LGTM> This will allow you to interactively squash and/or drop any changes. Squashing allows you to combine several smaller commits into a larger more significant one. This step isn't strictly necessary but keeps our repo more concise and easier to navigate.
  5. Congratulations your PR is merged into the master repo!