Difference between revisions of "Git"

From Mu2eWiki
Jump to navigation Jump to search
Line 11: Line 11:
 
Please also see the basic [[CodeRecipe|code recipe]] for an introduction to setting up the environment, checking out code and building.
 
Please also see the basic [[CodeRecipe|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 [https://cdcvs.fnal.gov/redmine/projects/mu2eofflinesoftwaremu2eoffline/wiki/Git_Workflow_for_Mu2e detailed mu2e instructions]
+
If you are going to commit anything, you must understand and follow the [https://cdcvs.fnal.gov/redmine/projects/mu2eofflinesoftwaremu2eoffline/wiki/Git_Workflow_for_Mu2e mu2e commit instructions]
  
<font>need to add instructions on first-time use: ~.gitconfig</font>
+
If this is the first time you are using git in the mu2e environment, please follow the few steps listed [https://cdcvs.fnal.gov/redmine/projects/mu2eofflinesoftwaremu2eoffline/wiki/Introduction_to_git here under "Configure git"] in order to set up your ~.gitconfig.
 +
 
 +
I more detailed introduction to mu2e repositories is [https://cdcvs.fnal.gov/redmine/projects/mu2eofflinesoftwaremu2eoffline/wiki/Revision_Control_Systems mu2e here]
  
 
* checkout the main repository
 
* checkout the main repository
Line 32: Line 34:
 
* see what the status is
 
* see what the status is
 
<pre>git status</pre>
 
<pre>git status</pre>
 +
* command line help
 +
<pre>git status help</pre>
 +
* git browser (to see a graphical history of commits)
 +
<pre>gitk --all</pre>
 +
  
Please see the references or many web resources for details on git commands and features.
+
Please see the references below or many web resources for details on git commands and features.
 
If you are going to commit anything, you must understand and follow the [https://cdcvs.fnal.gov/redmine/projects/mu2eofflinesoftwaremu2eoffline/wiki/Git_Workflow_for_Mu2e mu2e commit instructions]
 
If you are going to commit anything, you must understand and follow the [https://cdcvs.fnal.gov/redmine/projects/mu2eofflinesoftwaremu2eoffline/wiki/Git_Workflow_for_Mu2e mu2e commit instructions]
  

Revision as of 21:54, 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 mu2e|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
  • checkout the head to a local working branch (recommended)
get 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
get 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 commands and features. If you are going to commit anything, you must understand and follow the mu2e commit instructions


References