Skip to content

How to keep your development branch up to date

Laurie Carson edited this page Dec 2, 2018 · 1 revision

Once you have cloned the WRF repository and created your own branch, you are working in a local copy of the repository (on your local machine, or HPC, etc). In order to get any updates that other developers may have made to the HWRF code, you will need to "pull" those updates into your local copy.

  • First, confirm that you're on your development branch (you can also do this for your local HWRF branch!)

git remote -v git branch

The "git remote" command should show that your local repository is cloned from https://github.com/NCAR/HWRFdev.

The "git branch" command should show that you have checked out your branch (or that you are using the HWRF branch)

  • Now, "pull" any changes from the github/HWRF branch into your working branch.

git pull origin HWRF

This command will "fetch" the HWRF branch from the remote named "origin" (see above), and merge it with the code you are using (mybranch)

If there are conflicts, you will need to resolve these, and commit them.

  • Finally, assuming the merge is complete without issues, you need to "push" your branch back to github.com, so that it's accessible to you (on different machines) or others (for code reviews, etc)

git push -u origin mybranch

Clone this wiki locally