Difference between revisions of "ROOT Analyzer/Git"
m |
|||
Line 16: | Line 16: | ||
We will be pulling the git repository from hallcweb, so we must install the JLab web certificate authority root. Get the latest certificate file ([https://cc.jlab.org/system/files/JLabWinCA-2011.crt JLabWinCA-2011.crt]) from [https://cc.jlab.org/JLabCAs] and put it somewhere. Then tell git the location of the crt file with | We will be pulling the git repository from hallcweb, so we must install the JLab web certificate authority root. Get the latest certificate file ([https://cc.jlab.org/system/files/JLabWinCA-2011.crt JLabWinCA-2011.crt]) from [https://cc.jlab.org/JLabCAs] and put it somewhere. Then tell git the location of the crt file with | ||
− | git config --global http.sslCAInfo "<i> | + | git config --global http.sslCAInfo "/<i>pathto</i>/JLabWinCA-2011.crt" |
== Retrieving the Hall C analyzer skelton with git == | == Retrieving the Hall C analyzer skelton with git == | ||
Line 40: | Line 40: | ||
Basically if you want to develop the analyzer, clone the git archive as described above. Then create a private branch for yourself with | 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 | + | git checkout -b <i>myprivatebranch</i> |
Then work on the code do <tt>git commit -a</tt> 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. | Then work on the code do <tt>git commit -a</tt> 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. | 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. |
Revision as of 13:42, 1 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 skeloton of a Hall C analyzer based on the Hall A PODD analyzer.
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"
Retrieving the Hall C analyzer skelton 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.