Difference between revisions of "ROOT Analyzer/Git"

From HallCWiki
Jump to navigationJump to search
(Add ssl no verify)
m
Line 17: Line 17:
  
 
   git config --global http.sslCAInfo "/<i>pathto</i>/JLabWinCA-2011.crt"
 
   git config --global http.sslCAInfo "/<i>pathto</i>/JLabWinCA-2011.crt"
 +
 +
On machines with old git versions (e.g. ifarml machines), it seems to be also necessary to set the following option:
 +
 +
  git config --global --global http.sslVerify 0
  
 
== Retrieving the Hall C analyzer skeleton with git ==
 
== Retrieving the Hall C analyzer skeleton with git ==
Line 25: Line 29:
  
 
The last word on the command line is the name of the directory that will be created.  Any directory name could be used.
 
The last word on the command line is the name of the directory that will be created.  Any directory name could be used.
 
If the the git clone command does not work, (it may not on the Jlab ifarml machines), do
 
 
  git config --global --global http.sslVerify 0
 
 
and try the git clone command again.
 
  
 
The hcana project includes a git "submodule" containing the source code for the Hall A analyzer.  The Hall A code is not automatically downloaded with the "git clone" command.  Before proceeding, do
 
The hcana project includes a git "submodule" containing the source code for the Hall A analyzer.  The Hall A code is not automatically downloaded with the "git clone" command.  Before proceeding, do

Revision as of 14:24, 2 March 2012

It has been proposed that Hall C use the Git version control system to manage development of the Hall C 12 Gev analysis software. To start working with git, a public repository of a bare skeleton of a Hall C analyzer based on the Hall A PODD analyzer has been created.

Setting up Git

You should have git, with at least version 1.5.3 installed on your computer. Most linux systems will have git installed. https://cc.jlab.org/system/files/JLabWinCA-2011.crt Personalize git on your machine with

 git config --global user.name "Firstname Lastname"
 git config --global user.email "your_email@youremail.com"

By default, git pops up the vi editor, for the user write comments when making commits. IWef you prefer emacs, do

 git config --global core.editor "emacs"

We will be pulling the git repository from hallcweb, so we must install the JLab web certificate authority root. Get the latest certificate file (JLabWinCA-2011.crt) from [1] and put it somewhere. Then tell git the location of the crt file with

 git config --global http.sslCAInfo "/pathto/JLabWinCA-2011.crt"

On machines with old git versions (e.g. ifarml machines), it seems to be also necessary to set the following option:

 git config --global --global http.sslVerify 0

Retrieving the Hall C analyzer skeleton with git

To retrive the Hall C code with git, do

 git clone https://hallcweb.jlab.org/git/hcana.git hcana

The last word on the command line is the name of the directory that will be created. Any directory name could be used.

The hcana project includes a git "submodule" containing the source code for the Hall A analyzer. The Hall A code is not automatically downloaded with the "git clone" command. Before proceeding, do

 cd hcana
 git submodule init
 git submodule update

See Analyzer/Compiling and Analyzer/Running to try out the code.

Using Git to develop the analyzer

We need to have a workflow methodology for developing the Hall C analyzer. "Understanding the Git Workflow" and "Our Simple Git Workflow" have some discussion of straight forward workflows.

Basically if you want to develop the analyzer, clone the git archive as described above. Then create a private branch for yourself with

 git checkout -b myprivatebranch

Then work on the code do git commit -a frequently. Don't worry about committing changes frequently. You will have the opportunity to clean up the revision history before pushing your changes to the public repository.

There are a variety of ways to share your work. If someone you want to share it with is on the same machine (and your files are readable), he can clone or pull from your archive. If your working directory is available on the web, then anyone can clone or pull from it. To put your changes in the public git repository, contact one of the code maintainers.