-
Notifications
You must be signed in to change notification settings - Fork 9
How to clone the Github NOAA_3drtma repository and create a new branch
EdwardColon-NOAA edited this page Jul 24, 2019
·
1 revision
First, ensure that you have properly configured the machine so that it can access the Github repository (NOAA_3drtma).
To clone the NOAA_3drtma repository, use the following command:
git clone https://github.com/NOAA-EMC/NOAA_3drtma
Once the cloning process is complete, you go into your new EMC_noaa-3drtma directory.
By default, you will be in the master branch. You can verify this by using:
git branch
You should see master with an asterisk next to it (* master)
To create a new branch from the master, use:
git checkout -b branch-name
This will create a new branch, branch-name, and check it out.
To ensure that you are in your new branch, use:
git branch
You should see that the asterisk is now next to your new branch (* branch-name)
Example of creating a new branch
I've cloned a fresh copy of the NOAA_3drtma repository and I need to create a new branch for development.
Within EMC_noaa-3drtma, I ensure that I am currently in the master branch:
[Ming.Hu@tfe07 EMC_noaa-3drtma]$ git branch
* master
Everything looks good, so I will now create a new branch from the master:
[Ming.Hu@tfe07 EMC_noaa-3drtma]$ git checkout -b build_initial_system
Switched to a new branch 'build_initial_system'
Now, I need to make sure that I'm in my new branch:
[Ming.Hu@tfe07 EMC_noaa-3drtma]$ git branch
* build_initial_system
master
I'm good to go! Now I can begin my development in the build_initial_system branch.