GitHubWorkflow: Difference between revisions

From Mu2eWiki
Jump to navigation Jump to search
(Created page with "==Introduction== This page describes a recommended git workflow for use with the Mu2e Offline code once we have switched to GitHub.")
 
No edit summary
Line 2: Line 2:


This page describes a recommended git workflow for use with the Mu2e Offline code once we have switched to GitHub.
This page describes a recommended git workflow for use with the Mu2e Offline code once we have switched to GitHub.
==Downloading Offline as a user and NOT a developer==
<b>Option 1</b>: you want the default primary version of the code (most people):
<ol style="list-style-type:roman">
<li>clone the repo:</li>
  git clone https://github.com/mu2e/Offline
<li>Done!</li>
</ol>
<b>Option 2</b>: A particular collaborator has a version or branch you want to use:
<ol style="list-style-type:roman">
<li> Find their github user name</li>
<li> Determine what the name of the branch they are working on is (Note: this can be master!)
<li> Clone their fork:</li>
  git clone https://github.com/<user name>/Offline
  cd Offline
  git checkout origin/<branch name>
<li>Done!</li>
</ol>
<b>Option 3</b>: You want to us pgit to avoid a long compilation time (IN PROGRESS)
<ol style="list-style-type:roman">
<li> Create new directory to put your Offline repo in and move to that directory</li>
  mkdir Offline
  cd Offline
<li> As in Option 2, determine fork and branch name you wish to use</li>
<li> Create a partial checkout clone</li>
  pgit2 setup https://github.com/<user name (or mu2e)>/Offline <branch name>
<li> You can now use as normal:</li>
  source setup.sh
  scons -j 4
</ol>

Revision as of 21:07, 16 August 2019

Introduction

This page describes a recommended git workflow for use with the Mu2e Offline code once we have switched to GitHub.

Downloading Offline as a user and NOT a developer

Option 1: you want the default primary version of the code (most people):

  1. clone the repo:
  2. git clone https://github.com/mu2e/Offline
  3. Done!

Option 2: A particular collaborator has a version or branch you want to use:

  1. Find their github user name
  2. Determine what the name of the branch they are working on is (Note: this can be master!)
  3. Clone their fork:
  4. git clone https://github.com/<user name>/Offline cd Offline git checkout origin/<branch name>
  5. Done!

Option 3: You want to us pgit to avoid a long compilation time (IN PROGRESS)

  1. Create new directory to put your Offline repo in and move to that directory
  2. mkdir Offline cd Offline
  3. As in Option 2, determine fork and branch name you wish to use
  4. Create a partial checkout clone
  5. pgit2 setup https://github.com/<user name (or mu2e)>/Offline <branch name>
  6. You can now use as normal:
  7. source setup.sh scons -j 4