Skip to content

Contributing to BEE

Allen McPherson edited this page Jan 3, 2020 · 5 revisions

Contributions to BEE are accepted as pull requests. You'll need to fork the BEE repository, create your bug/feature branch (we don't develop on the master branch), and submit a pull request with the master branch as the target. Outlined below are the steps necessary to employ this workflow.

If you're a member of the development team, and you anticipate that your code will be merged into the development tree, continue to use the standard branch & pull request model (forking is not required).

  • Click the Fork button at the top of the BEE_Private repo. This will fork the repository into your personal account. Note that since the BEE_Private repository is private, your forked version will be as well. You can not make a forked private repository public. For others to see your private personal you need to add them as collaborators.

  • Clone your forked repository and cd BEE_Private.

  • Make sure to set your Git configuration locally if you don't have it set locally (e.g. git config -local user.email ...).

  • Add an upstream remote reference to your personal repo:

> git remote add upstream git@github.com:lanl/BEE_Private.git
> git remote -v
  • Make sure you're on the master branch. Update your personal repo with any changes that have been made to the original repo.
BEE_Private (master) » git fetch upstream
BEE_Private (master) » git merge upstream/master     (will rebase if possible)
BEE_Private (master) » git push
...or...
BEE_Private (master) » git pull --rebase upstream master
BEE_Private (master) » git push
...then go to your branch and merge in master...
BEE_Private (my-nifty-branch) » git merge master
BEE_Private (my-nifty-branch) » git push
  • Now create and work on a new branch:
BEE_Private (master) » git checkout -b my-new-branch
...edit and push changes to your local repo...
BEE_Private (my-new-branch) » git add -A
BEE_Private (my-new-branch) » commit -m "Bogus commit to test new branch on fork"
BEE_Private (my-new-branch) » git push --set-upstream origin  my-new-branch (only need to do this once)
...rinse and repeat as many times as necessary...
  • When your changes are ready, submit a pull request on the main (LANL/BEE_Private) repo.

  • Once your pull request has been accepted and merged, delete your branch.

BEE_Private (master) » git branch -d my-new-branch
BEE_Private (master) » git push origin master
BEE_Private (master) » git push --delete origin my-new-branch