Difference between revisions of "Guide to Using Git"

From GlueXWiki
Jump to: navigation, search
(If you are starting from scratch:)
(If you are starting from scratch:)
Line 1: Line 1:
 
== If you are starting from scratch:  ==
 
== If you are starting from scratch:  ==
# Create local repository in the current directory
+
# First you need to create a clone of the master repository on your local machine.  The below commands pull all of the code, branches, etc. for the entire history of the project into the current, local directory.
#* <code>git clone https://github.com/jeffersonlab/sim-recon</code>
+
#* sim-recon:
 +
#**
 +
<code>cd $GLUEX_TOP/sim-recon/
 +
git clone https://github.com/jeffersonlab/sim-recon</code>
 +
 
 +
#* hdds: <code>git clone https://github.com/jeffersonlab/hdds</code>
 +
#* Guide: https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository
 
#* Reference: http://git-scm.com/docs/git-clone
 
#* Reference: http://git-scm.com/docs/git-clone
 
# Create a local branch
 
# Create a local branch

Revision as of 16:06, 29 July 2015

If you are starting from scratch:

  1. First you need to create a clone of the master repository on your local machine. The below commands pull all of the code, branches, etc. for the entire history of the project into the current, local directory.
    • sim-recon:

cd $GLUEX_TOP/sim-recon/ git clone https://github.com/jeffersonlab/sim-recon

  1. Create a local branch
    • cd sim-recon
    • git branch my_work
  2. Check-out the new branch
    • git checkout my_work