-
Notifications
You must be signed in to change notification settings - Fork 0
Quick start guide for HAFS developer v1.0
-
Fork the HAFS repository:
Navigate to https://github.com/NOAA-EMC/HAFS, locate and click on the "fork" button towards the top right of the page.
To get the personal fork (all branches included):
$ git clone https://[email protected]/USER/HAFS.git (remove --recursive here to avoid submodule/branch issue; recursive is done in submodule update)
-
Check out develop branch (it is the branch recommended for developers to work on)
$ git checkout develop
$ git submodule update --init --recursive (update/fetch submodule: remove "--remote" which will check out the latest commit for each submodule---not always desirable)
-
Set upstream repository for individual fork:
$ git remote add upstream https://[email protected]/NOAA-EMC/HAFS.git
$ git remote update (update all of your branches set to track remote ones, but not merge any changes in)
$ git merge remotes/community/develop (merge upstream into local branch)
$ git remote -v show
If you want to remove the remote upstream URL:
$ git remote rm upstream
-
To update/modify and commit code related to vlab (fre-nctools for pre-processing, chgres, GSI, forecast, EMC_post), please see 5-6;
To update/modify and commit code related to HAFS github repo (vortex tracker, util etc), please see 7-8.
-
Work on HAFS branch and keep in sync with master:
$ cd sorc/xxxx.fd
$ git checkout HAFS
$ git checkout -b my-feature-branch
To keep in sync with HAFS branch
$ git checkout HAFS
$ git pull
$ git checkout my-feature-branch
$ git merge HAFS
-
Modify code and ready to commit change to HAFS:
$ modify code and test
$ git add file_changed (or $ git add all)
$ git commit -m “message”
$ git checkout HAFS
$ git merge my-feature-branch
$ git push origin HAFS
-
Work on develop branch and keep in sync with upstream:
$ cd sorc/xxxx.fd
$ git checkout develop
$ git checkout -b my-feature-branch
To keep in sync with develop branch
$ git checkout develop
$ git pull
$ git checkout my-feature-branch
$ git merge develop
-
Modify code and ready to commit change to develop:
$ modify code and test
$ git add file_changed (or $ git add all)
$ git commit -m “message”
$ git checkout develop
$ git merge my-feature-branch
$ git push origin develop
Go to github and do pull request to HAFS authoritative develop branch