GitHub

From CSDMS
Revision as of 17:01, 24 February 2015 by WikiSysop (talk | contribs) (Created page with "= Source code version control: GitHub = __TOC__ CSDMS uses GitHub as software version control system to provide access for those who want to share their model source code whi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Source code version control: GitHub

CSDMS uses GitHub as software version control system to provide access for those who want to share their model source code while it is in development through the CSDMS model development repository. Svn keeps track of current and historical versions of source code. You need a Git client version on your computer to upload model source code changes. See the official GitHub page to read more about how it works

Is GitHub the right tool for you?

CSDMS has a special repository in GitHub, CSDSM-contrib for those who don't want to have their own GitHub repository. Model developers can provide CSDMS the code to upload to the CSDMS-contrib GitHub repository to share it with other developers. In that way a group of developers can for example work on the same model without worrying about different model versions. Users can download source code by searching the right model on the model description pages (Model download portal). Each contributed model to CSDMS will be add to the GitHub repository.

Get a CSDMS-svn login

Do you want to upload your model source code to the CSDMS model repository? Don't hesitate, email (CSDMS@Colorado.edu) or phone us (see Contact_us) and we'll set you up. People don't need a log in to download source code. A log in is only required for uploading your model.

Check out models (anonymous)

You can access the CSDMS svn repository anonymously, via regular HTTP if you don't have an login.

To check out any of the models in the CSDMS repository use the next command:

svn checkout https://csdms.colorado.edu/svn/<Model REPOSITORY NAME>

Commit models (as developer)

Upload changes

If you are happy with the changes you have made to the code and you want to commit them for others to see, use:

svn commit <altered file> -m <useful message>

A few things to remember before committing changes:

  • Please, at the very least, make sure that the changes you made are an improvement to the code. If the code compiled, make sure it still compiles.
  • Make sure the <useful message> is, well, useful.

Some other useful commands

Below you might find some useful commands. Make sure to read more about how to apply those commands in the svn manual as each command has it is own set of parameters for specific functionality.

  • Update your working copy

To update your copy, make sure you are in the directory where your code is and use the following command:

svn update
  • Create diff

Create a text file which shows all the changes done in the working copy compared to the repository:

svn diff
  • Check the status of your working copy

To check the status of your working copy:

svn status