Skip to content
This repository has been archived by the owner on Aug 15, 2018. It is now read-only.

Getting BOUT

dschwoerer edited this page Feb 1, 2016 · 1 revision

Obtaining BOUT++

To check out from github you don't need to set up an account or anything. Just run

$ git clone git://github.com/boutproject/BOUT.git

Contributing to BOUT++

If you want to be able to check changes into the repository then you need to:

  1. Go to http://github.com/plans
  2. Click on "Create a free account"
  3. Enter a username, email and password then "Create account"
  4. Once you've got this set up, send me your username and i can give you write access to the repository.

Note

There are lots of help pages here: http://help.github.com In order to "push" changes you've made onto the server, you need to generate an SSH key pair (see http://help.github.com/linux-key-setup)

Obtaining BOUT++ through SSH

After all of that, you will need to check out a copy using ssh:

$ git clone [email protected]:boutproject/BOUT.git

(no need to add your username).

Optional

I recommend creating a config file in your home directory

$ vi ~/.gitconfig

containing:

[user]
	name = Your Name
	email = Your Email Address

[alias]
	st = status
	ci = commit
	br = branch
	co = checkout
	df = diff
	lg = log -p
	who = shortlog -s --

This will add your name and email address onto commits, and allow you to use some abbreviations

Git commands

At this point you can use Git pretty much like SVN:

  1. Make some changes
  2. Get the latest changes from the server by running:
    $ git pull
  3. To check in all your changes, use
    $ git ci -a
    which will then pop up an editor (using EDITOR environment variable) to enter your commit message
  4. Push your changes onto the server

At this point your changes are committed in your copy of the repository (it's a distributed system, so all repositories are equivalent and store the full history. Hence why it's a "clone" rather than "checkout": Your local repository is the same as the one on the server)

To send your changes to the server, use

$ git push

If you have pulled in the latest changes then this should succeed. If it fails then run "git pull" first before pushing again.

Additional Notes

  • To add a file, use "git add <file>"
  • To remove a file, "git rm <file>"
  • To move a file, "git mv <source> <dest>"

If you want to commit only some of your changes, use

$ git add <file>

to add the files you want to commit, then run

$ git ci

(without the "-a").