Difference between revisions of "Git"

From Mu2eWiki
Jump to navigation Jump to search
Line 8: Line 8:
 
One important piece, the [[BTrk]] UPS product, which contains our Kalman track fit code, is stored in the [https://github.com/KFTrack/BTrk BTrk github repo].   
 
One important piece, the [[BTrk]] UPS product, which contains our Kalman track fit code, is stored in the [https://github.com/KFTrack/BTrk BTrk github repo].   
  
 +
A git repository is accessed through a url.  For exampel this is the url for the main offline code resposity
 +
ssh://p-mu2eofflinesoftwaremu2eoffline@cdcvs.fnal.gov/cvs/projects/mu2eofflinesoftwaremu2eoffline/Offline.git
 
There exist several other mu2e Redmine repositories for various tools not tightly coupled to Offline.  You can browse [https://cdcvs.fnal.gov/redmine/projects all Redmine projects] and  
 
There exist several other mu2e Redmine repositories for various tools not tightly coupled to Offline.  You can browse [https://cdcvs.fnal.gov/redmine/projects all Redmine projects] and  
[https://cdcvs.fnal.gov/redmine/projects/mu2e mu2e Redmine].  The mu2e Redmine has subprojects (and sub-subprojects) and each has a repository associated with them.  For example in the "Standalone" subproject, there is a sub-subproject "" with repo url:
+
[https://cdcvs.fnal.gov/redmine/projects/mu2e mu2e Redmine].  The mu2e Redmine has subprojects (and sub-subprojects) and each has a repository associated with them.  For example in the [https://cdcvs.fnal.gov/redmine/projects/Standalone Standalone] subproject, there is a sub-subproject [https://cdcvs.fnal.gov/redmine/projects/mu2eccfc Mu2eCCFC] with repo url:p-mu2eccfc
   
+
  ssh://p-mu2eccfc@cdcvs.fnal.gov/cvs/projects/mu2eccfc-mu2eccfc/mu2eccfc.git
In addition, the main mu2e Offline repository has sub-repositories which can be seen on the right sidebar menu on the [https://cdcvs.fnal.gov/redmine/projects/mu2eofflinesoftwaremu2eoffline/repository main page].  An example is the "dhtools" sub-repo, which has url:
+
In addition, the main mu2e Offline repository has sub-repositories which can be seen on the right sidebar menu on the repository [https://cdcvs.fnal.gov/redmine/projects/mu2eofflinesoftwaremu2eoffline/repository main page].  An example is the "dhtools" sub-repo, which has url:
  ssh://p-mu2eofflinesoftwaremu2eoffline@cdcvs.fnal.gov/cvs/projects/mu2eofflinesoftwaremu2eoffline/Offline.git
+
  ssh://p-mu2eofflinesoftwaremu2eoffline@cdcvs.fnal.gov/cvs/projects/mu2eofflinesoftwaremu2eoffline-dhtools/dhtools.git
  
See [[#References|the references]] for more details on git.
+
See [[#References|the references]] for more details on Redmine and git.
  
 
==Quick Start==
 
==Quick Start==

Revision as of 19:18, 25 May 2017

Introduction

The primary source code management system for the Mu2e Offline software is a git repository that is hosted on the Fermilab Fermilab redmine site. Other Mu2e software is managed using other source code management systems.

NB, please follow these commit instructions for the mu2e conventions on commits.

Almost all of the mu2e Offline code is currently in one Redmine repository. One important piece, the BTrk UPS product, which contains our Kalman track fit code, is stored in the BTrk github repo.

A git repository is accessed through a url. For exampel this is the url for the main offline code resposity

ssh://p-mu2eofflinesoftwaremu2eoffline@cdcvs.fnal.gov/cvs/projects/mu2eofflinesoftwaremu2eoffline/Offline.git

There exist several other mu2e Redmine repositories for various tools not tightly coupled to Offline. You can browse all Redmine projects and mu2e Redmine. The mu2e Redmine has subprojects (and sub-subprojects) and each has a repository associated with them. For example in the Standalone subproject, there is a sub-subproject Mu2eCCFC with repo url:p-mu2eccfc

ssh://p-mu2eccfc@cdcvs.fnal.gov/cvs/projects/mu2eccfc-mu2eccfc/mu2eccfc.git

In addition, the main mu2e Offline repository has sub-repositories which can be seen on the right sidebar menu on the repository main page. An example is the "dhtools" sub-repo, which has url:

ssh://p-mu2eofflinesoftwaremu2eoffline@cdcvs.fnal.gov/cvs/projects/mu2eofflinesoftwaremu2eoffline-dhtools/dhtools.git

See the references for more details on Redmine and git.

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.

A 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
  • 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

Creating Redmine repositories

mu2e instructions and SCD instructions.

References