Back to DevDoc

Some tips for working with git

Since July 2010, main sources of OpenMOLE and SimExplorer are stored on a git versioning system.

Usual commands

How to retrieve the sources:

git clone http://git.simexplorer.org/

How to add files to git repository:

git add {list of file or * for recursive finding of new files}

How to commit your modifications:

git commit {list of files or -a for all}

How to push your commits on the server (don't forget the last slash):

git push http://yourlogin@git.simexplorer.org/

How to update your local version:

git pull

How to revert local changes on some files:

git checkout -- path/to/your/file

Git configuration

Start by giving to git your username/email:

git config --global user.name "Your Name"
git config --global user.email you@example.com

You can then add some alias commands, for example:

git config --global alias.st status
git config --global alias.ci commit

And maybe add some colours:

git config --global color.ui auto

Then, as git uses curl, you have to configure authentification by editing the .netrc file like this:

machine git.simexplorer.org
login yourlogin
password xxxxxxxx

Don't forget to restrict access rights to this file that contain your password.

logo cemagref

logo iscpif

logo lifegrid

logo region auvergne

logo patres project