User Tools

Site Tools


wphase:repository

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wphase:repository [2015/01/23 16:52]
wphase
wphase:repository [2015/02/03 11:06] (current)
wphase
Line 1: Line 1:
 ======= Using Git for W-phase ======= ======= Using Git for W-phase =======
  
-===== W-phase Index ===== +===== How to use Git ===== 
-  * [[wphase:​documentation|Documentation]] + 
-  * [[wphase:tutorial|Tutorial]] +Instead of repeating things that were said elsewhere, let us just give some pointers
-  * [[wphase:repository|Repository]] +  * [[http://​git-scm.com/​download|Download Git]] 
-  * [[wphase:realtime|Real-time]] +  * [[http://git-scm.com/|Git Community]] 
-  * [[wphase:​todo|Todo]] +  * [[http://​schacon.github.com/​git/​user-manual.html|Git User Manual]]
-  * [[wphase:discussion|Discussion]]+
  
-===== Configure ssh-keys for GitHub ===== 
  
-https://​help.github.com/​articles/​generating-ssh-keys 
  
 ===== Make sure your version of Git is OK ===== ===== Make sure your version of Git is OK =====
Line 32: Line 29:
 error: The requested URL returned error: 403 while accessing https://​github.com/​eost/​wphase.git/​info/​refs error: The requested URL returned error: 403 while accessing https://​github.com/​eost/​wphase.git/​info/​refs
 </​code>​ </​code>​
-please make sure to update git to version 1.7.10 or later (see above), otherwise use +please make sure to update git to version 1.7.10 or later (see above).
-<​code>​ +
-git clone https://​yourusername@github.com/​eost/​wphase.git wphase_package +
-</​code>​+
  
-===== Regular daily usage =====+===== Regular daily usage: master branch (for regular users) ​=====
  
-To update your local W-phase repository (pull changes)+  * To update your local copy of the W-phase repository (pull changes ​from the master branch, i.e., stable version)
 <​code>​ <​code>​
 cd /​to/​the/​wphase/​directory/​ cd /​to/​the/​wphase/​directory/​
Line 45: Line 39:
 </​code>​ </​code>​
  
-To display ​the differences with the current ​HEAD commit, use:+ 
 +===== Regular daily usage: develop branch (for developers) ===== 
 + 
 +**If you would like to contribute or if you have any questions/​suggestions,​ [[zacharie.duputel@unistra.fr,​luis.rivera@unistra.fr|please contact us]].** 
 + 
 +  * After cloning the repository, one may want to list existing branches 
 +<​code>​ 
 +git branch -a 
 +</​code>​ 
 + 
 +  * To update your local copy of the W-phase repository (pull changes from the develop branch) 
 +<​code>​ 
 +git pull origin develop 
 +* master 
 +  remotes/​origin/​HEAD -> origin/​master 
 +  remotes/​origin/​develop 
 +  remotes/​origin/​master 
 +</​code>​ 
 +Notice the * character that prefixes the "​master"​ branch: it indicates the branch that you currently have checked out.  
 + 
 +   * If you want to work on the develop branch, you can create a local version using: 
 +<​code>​ 
 +git checkout -b develop origin/​develop 
 +</​code>​ 
 + 
 +   * To see the last commit ​on each local branchyou can run  
 +<​code>​ 
 +git branch -v 
 +* develop 308999e Enable python3 compatibility in bin/​traces_regional.py (...) 
 +  master ​ 2f33728 Correction numero de version -> r249 
 +</​code>​ 
 + 
 +   * To switch from one branch to another 
 +<​code>​ 
 +git checkout master 
 +</​code>​ 
 +or 
 +<​code>​ 
 +git checkout develop 
 +</​code>​ 
 + 
 +   * make some changes to any file you want using your favorite editor (in the line below we use vi as an example) 
 +<​code>​ 
 +vi some_file.c 
 +</​code>​ 
 + 
 +   * You may want to check what has changed (and thus that will be committed), you can type one or both of these two commands:
 <​code>​ <​code>​
 git status git status
 +git diff
 </​code> ​ </​code> ​
  
-To prepare the content staged for the next commit, use:+   ​* ​To prepare the content staged for the next commit, use:
 <​code>​ <​code>​
 git add files_for_the_next_commit git add files_for_the_next_commit
 </​code> ​ </​code> ​
  
-To store the current contents of the index in a new commit, ​use:+   * You can then commit ​staged changes locallyadding a short message (one line) explaining what you have changed
 <​code>​ <​code>​
 git commit -m "log message describing the changes"​ git commit -m "log message describing the changes"​
 </​code> ​ </​code> ​
  
-To update ​the github W-phase repository after commit(push changes):+   * Before pushing ​the results, you can synchronise and see the local database using
 <​code>​ <​code>​
-git push origin ​master+git fetch origin 
 +git branch -a 
 +git branch -v 
 +(etc...) 
 +</​code>​ 
 + 
 +   * You can then push your changes to your GitHub fork 
 +<​code>​ 
 +git push origin ​develop
 </​code> ​ </​code> ​
 +
 +   * To merge develop into the master branch
 +<​code>​
 +git checkout master
 +git merge develop
 +</​code> ​
 +
 +   * To create a new version tag, edit "​Version:​ rXXX" in bin/​Arguments.py and bin/​RUNA3.csh. You should also add the corresponding tag using:
 +<​code>​
 +git tag -a rXXX -m "Short description of this release"​
 +</​code>​
 +
 +   * Listing the available tags in Git is straightforward. Just type
 +<​code>​
 +git tag
 +</​code>​
 +
 +   * You can also see the tag data along with the commit that was tagged by using
 +<​code>​
 +git show r252
 +</​code>​
 +===== Configure ssh-keys for GitHub =====
 +
 +https://​help.github.com/​articles/​generating-ssh-keys
  
wphase/repository.1422028350.txt.gz · Last modified: 2015/01/23 16:52 by wphase