Git: Difference between revisions
No edit summary |
No edit summary |
||
Line 21: | Line 21: | ||
** with kerberos authentication for committing code <pre>git clone ssh://p-mu2eofflinesoftwaremu2eoffline@cdcvs.fnal.gov/cvs/projects/mu2eofflinesoftwaremu2eoffline/Offline.git</pre> | ** with kerberos authentication for committing code <pre>git clone ssh://p-mu2eofflinesoftwaremu2eoffline@cdcvs.fnal.gov/cvs/projects/mu2eofflinesoftwaremu2eoffline/Offline.git</pre> | ||
* checkout the head to a local working branch (recommended) | * checkout the head to a local working branch (recommended) | ||
<pre> | <pre>git checkout -b work</pre> | ||
* see the history of a file | * see the history of a file | ||
<pre>git log fileSpec</pre> | <pre>git log fileSpec</pre> | ||
Line 27: | Line 27: | ||
<pre>git tag -l</pre> | <pre>git tag -l</pre> | ||
* checkout a tag or branch into the working area | * checkout a tag or branch into the working area | ||
<pre> | <pre>git checkout tagOrBranchName </pre> | ||
* update the local repository | * update the local repository | ||
<pre>git fetch</pre> | <pre>git fetch</pre> |
Revision as of 21:59, 17 February 2017
Introduction
The primary source code management system for the Mu2e Offline software is a git that is hosted on the Fermilab redmine site. Other Mu2e software is managed using other source code management systems.
Please follow these commit instructions for the mu2e conventions on commits.
The BTrk UPS product, which contains our kalman fit code, is stored in the BTrk github repo
Quick Start
Please also see the basic code recipe for an introduction to setting up the environment, checking out code and building.
If you are going to commit anything, you must understand and follow the mu2e commit instructions
If this is the first time you are using git in the mu2e environment, please follow the few steps listed here under "Configure git" in order to set up your ~.gitconfig.
I more detailed introduction to mu2e repositories is mu2e here
- checkout the main repository
- readonly:
git clone http://cdcvs.fnal.gov/projects/mu2eofflinesoftwaremu2eoffline/Offline.git
- with kerberos authentication for committing code
git clone ssh://p-mu2eofflinesoftwaremu2eoffline@cdcvs.fnal.gov/cvs/projects/mu2eofflinesoftwaremu2eoffline/Offline.git
- readonly:
- checkout the head to a local working branch (recommended)
git checkout -b work
- see the history of a file
git log fileSpec
- list tags
git tag -l
- checkout a tag or branch into the working area
git checkout tagOrBranchName
- update the local repository
git fetch
- update the local repository and checkout the head into the working area
git pull
- see what the status is
git status
- command line help
git status help
- git browser (to see a graphical history of commits)
gitk --all
Please see the references below or many web resources for details on git concepts, commands and features.
If you are going to commit anything, you must understand and follow the mu2e commit instructions
References
- mu2e git and CVS
- mu2e git commit instructions
- git home Documentation reference
- redmine repository browser
- Fermilab redmine
- talk at the Software and Simulation Meeting, Sept 17, 2014.
- Marc P's suggested git workflow for simple git projects
- Fermilab git workshop and related materials
- managing and creating new redmine repositories