-
Notifications
You must be signed in to change notification settings - Fork 5
Getting 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
If you want to be able to check changes into the repository then you need to:
- Go to http://github.com/plans
- Click on "Create a free account"
- Enter a username, email and password then "Create account"
- Once you've got this set up, send me your username and i can give you write access to the repository.
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)
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).
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
At this point you can use Git pretty much like SVN:
- Make some changes
- Get the latest changes from the server by running:
$ git pull
- To check in all your changes, use
which will then pop up an editor (using EDITOR environment variable) to enter your commit message
$ git ci -a
- 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.
- 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").