Skip to content

Git Usage

endymion1818 edited this page Mar 30, 2013 · 5 revisions

Git Usage

ROMS uses github (you probably spotted that already) to host the source code. Github uses a version control system called Git.

There are lots of tools and tutorials available for Git.

Using Git With Netbeans

Signing up to GitHub

How to request access to the ROMS repository in Github - BEN READ to write

Setting up the project

The Git netbeans plugin should already be installed. If it is not, go to menu: Tools->Plugins->Available Plugins and select it.

Get a local copy of the ROMS. From the menu: Team->Git->Clone

  1. First step - Remote repository Repository URL: https://github.com/RBC1B/ROMS.git . Set the user/Password as per your github account, if you set one up. Click next.
  2. Next step - remote branches. Select the the only remote branch: master, then click next
  3. Next step - destination directory. Unless you have changed where your project gets saved locally, this should all be fine. Click next.
  4. Open the project.

Using Git when changing code

The normal steps of usage are:

  1. Project menu: git->remote->pull. Accept the remote (github) url and the master branch. Your local copy of the code should now match the shared code on github. You should do a remote pull regularly to make sure you pick up other peoples changes.
  2. Make your fantastic changes
  3. Project menu: git->commit. Enter the message, check the files to be committed is correct.

At this point the changes are stored in your local repository. Steps 1 to 3 can be repeated if you are not ready to share your code. Pulling and merging other changes regularly will make your life easier.

Once you are happy to share your code, under Project menu: git->remote->push. Accept the remote (github) url and the master branch. You should be able to see your changes on github, e.g. see https://github.com/RBC1B/ROMS/commits/master