Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Split the long-term development in to pieces that can be checked in to master as they are finished (ask the IG for help on this if you want).
  2. Merge the development pieces back to master with PRs as is done for regular E3SM development.
  3. When you have enough code to execute some of your feature on master, add a test or tests for it.  These tests won't be added to the main acme E3SM test suites until the feature is "officially added".  If you have more then one, they could be part of a separate test suite.  Your PR must still pass the standard E3SMs testing.
  4. Develop the next piece of your feature with a new branch from the head of master.

...

Code Block
# If not done yet
git clone git@github.com:E3SM-Project/E3SM.git
For each incremental step
git fetch
git checkout master
git pull
# make new branch
git checkout -b username/branchname
# ... develop
# ... test locally
# push changes to master
git add <newfiles>
git commit -a
git push -u origin username/branchname

# Now make PR from ACMEE3SM github page https://github.com/E3SM-Project/E3SM

...

Code Block
# Let's assume new fork is https://github.com/MyProject/E3SM
git clone git@github.com/MyProject/E3SM.git
git fetch
git checkout master
git pull
# make new branch
git checkout -b username/branchname
# ... develop
# ... test locally
# push changes to master
git add <newfiles>
git commit -a
git push -u origin username/branchname

Syncing with ACME E3SM master

Code Block
reference: https://help.github.com/articles/syncing-a-fork/
$ git clone git@github.com/MyProject/E3SM.git
$ cd ACMEE3SM
$ git remote add upstream git@github.com:E3SM-Project/E3SM.git
# When updating fork from E3SM-Project/E3SM
$ git fetch upstream  (update local E3SM-Project/E3SM master, locally labelled 'upstream/master')
$ git checkout master (local MyProject/E3SM master)
$ git merge upstream/master (merge in changes from E3SM-Project/E3SM)
(resolve any conflicts)
$ git push origin master (push the merged changes to githup repo  git@github.com/MyProject/E3SM_Fork.git)

...

  1. Start a branch for your development as is done for any E3SM development.
  2. As you develop code on your branch, make a test or tests for your feature
  3. Keep your branch up-to-date by the following:
    1. PREFERRED: Periodically rebase your branch to the head of master (or head of the integration branch)
    2. OR you can merge master to your long-lived branch IF AND ONLY IF:
      1. A subroutine or function your feature depends on has changed its API OR
      2. A tag has been made on E3SM master (so you get a known state).   Do NOT make random "oh its been a while" merges of master to your branch.
      3. DO NOT merge from master just for machine config updates.  Cherry pick those or copy them.
  4. Run e3sm_developer on your branch along with tests for your feature as development proceeds.
  5. When finished, make a PR as for normal ACME E3SM development.

Key points:  Features lives on your branch until it is finished.   Maintaining the branch (with rebases or occasional merge from master) could become arbitrarily hard if related codes diverge.  Other developers unaware of feature until its finished. 

...