User Tools

Site Tools


wphase:repository

This is an old revision of the document!


Using Git for W-phase

Configure ssh-keys for GitHub

Make sure your version of Git is OK

You need to have a version of Git greater or equal to 1.7.10, thus type:

git --version

and if the version number displayed is 1.7.10 or greater everything is OK, otherwise you need to install a more recent version.

One-time configuration for each repository

The W-phase package is hosted as a github repository. To clone the W-phase repository:

git clone https://github.com/eost/wphase.git wphase_package

If you have an error like

error: The requested URL returned error: 403 while accessing https://github.com/eost/wphase.git/info/refs

please make sure to update git to version 1.7.10 or later (see above), otherwise use

git clone https://yourusername@github.com/eost/wphase.git wphase_package

Regular daily usage (for regular users)

  • To update your local copy of the W-phase repository (pull changes from the master branch, i.e., stable version)
cd /to/the/wphase/directory/
git pull origin master

Regular daily usage (for developers)

  • To update your local copy of the W-phase repository (pull changes from the develop branch)
cd /to/the/wphase/directory/
git pull origin develop
  • To see the last commit on each branch, you can run
git branch -v
* develop 308999e Enable python3 compatibility in bin/traces_regional.py (...)
  master  2f33728 Correction numero de version -> r249

Notice the * character that prefixes the develop branch: it indicates the branch that you currently have checked out.

  • To switch from one branch to another
git checkout master

or

git checkout develop
  • make some changes to any file you want using your favorite editor (in the line below we use vi as an example)
vi some_file.c
  • You may want to check what has changed (and thus that will be committed), you can type one or both of these two commands:
git status
git diff
  • To prepare the content staged for the next commit, use:
git add files_for_the_next_commit
  • You can then commit staged changes locally, adding a short message (one line) explaining what you have changed
git commit -m "log message describing the changes"
  • You can then push your changes to your GitHub fork
git push origin develop
  • To merge develop into the master branch
git checkout master
git merge develop
wphase/repository.1422341450.txt.gz · Last modified: 2015/01/27 07:50 by wphase