Difference between revisions of "Using Git Example"

From Genome Analysis Wiki
Jump to navigationJump to search
(Created page with '== Create a New Repository == These steps will create a new bare repository called gitPlayGroundSource in ~/code/. # Go to the correct directory #: <pre>cd ~/code</pre> # Create…')
 
Line 1: Line 1:
== Create a New Repository ==
+
== Clone Pre Existing Repository ==
These steps will create a new bare repository called gitPlayGroundSource in ~/code/.
 
  
 +
== Create a New Repository  ==
 +
 +
=== Create the Bare Repository  ===
 +
 +
These steps will create a new bare repository called learningGit in ~/code/learnGit/bareRepo/.
 +
 +
# Create the containing directory
 
# Go to the correct directory
 
# Go to the correct directory
#: <pre>cd ~/code</pre>
+
# Create a new bare repository  
# Create a new bare repository
+
# Move into the new repository
#:<pre>git init --bare --shared gitPlayGroundSource</pre>
+
# Look at the contents of the bare repository
# Move into the new Repository
+
# Look at the contents of <code>description</code>
#:<pre> cd gitPlayGroundSource</pre>
+
# Update <code>description</code> to say: <code>Example Repository for learning to use git.</code>
# Look at the contents
+
# Look at the updated contents of <code>description</code>
#:<pre> ls</pre>
+
 
# Update the repository description using your favorite text editor to say:
+
mkdir -p ~/code/learnGit/bareRepo/
#:<pre> Example Repository for learning to use git.</pre>
+
cd ~/code/learnGit/bareRepo/
 +
git init --bare --shared learningGit
 +
cd learningGit
 +
ls
 +
more description
 +
echo Example Repository for learning to use git. > description
 +
more description
 +
 
 +
[[Image:CreateNewGitRepository.png]]
  
[[File:CreateNewGitRepository.png]]
+
=== Add the first files ===

Revision as of 20:04, 7 July 2011

Clone Pre Existing Repository

Create a New Repository

Create the Bare Repository

These steps will create a new bare repository called learningGit in ~/code/learnGit/bareRepo/.

  1. Create the containing directory
  2. Go to the correct directory
  3. Create a new bare repository
  4. Move into the new repository
  5. Look at the contents of the bare repository
  6. Look at the contents of description
  7. Update description to say: Example Repository for learning to use git.
  8. Look at the updated contents of description
mkdir -p ~/code/learnGit/bareRepo/
cd ~/code/learnGit/bareRepo/
git init --bare --shared learningGit
cd learningGit
ls
more description
echo Example Repository for learning to use git. > description
more description

CreateNewGitRepository.png

Add the first files