getting and creating almost done
This commit is contained in:
parent
5cbc4da729
commit
f09151836a
@ -33,19 +33,17 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid_3" id="reflist">
|
<div class="grid_2" id="reflist">
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<h3><a href="/creating">Getting and Creating Projects</a></h3>
|
<h3><a href="/creating">Getting and Creating Projects</a></h3>
|
||||||
<h4>Starting or copying a Git repository</h4>
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="/creating/init.html">init</a></li>
|
<li><a href="/creating/#init">init</a></li>
|
||||||
<li><a href="/creating/clone.html">clone</a></li>
|
<li><a href="/creating/#clone">clone</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<h3><a href="/basic">Basic Snapshotting</a></h3>
|
<h3><a href="/basic">Basic Snapshotting</a></h3>
|
||||||
<h4>Saving your work</h4>
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="/basic/add.html">add</a></li>
|
<li><a href="/basic/add.html">add</a></li>
|
||||||
<li><a href="/basic/status.html">status</a></li>
|
<li><a href="/basic/status.html">status</a></li>
|
||||||
@ -58,7 +56,6 @@
|
|||||||
|
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<h3><a href="/branching">Branching and Merging</a></h3>
|
<h3><a href="/branching">Branching and Merging</a></h3>
|
||||||
<h4>Working in contexts</h4>
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="/branching/branch.html">branch</a></li>
|
<li><a href="/branching/branch.html">branch</a></li>
|
||||||
<li><a href="/branching/merge.html">merge</a></li>
|
<li><a href="/branching/merge.html">merge</a></li>
|
||||||
@ -69,7 +66,6 @@
|
|||||||
|
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<h3><a href="/remotes">Sharing and Updating Projects</a></h3>
|
<h3><a href="/remotes">Sharing and Updating Projects</a></h3>
|
||||||
<h4>Using Git to work with others</h4>
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="/remotes/fetch-pull.html">fetch, pull</a></li>
|
<li><a href="/remotes/fetch-pull.html">fetch, pull</a></li>
|
||||||
<li><a href="/remotes/push.html">push</a></li>
|
<li><a href="/remotes/push.html">push</a></li>
|
||||||
@ -78,7 +74,6 @@
|
|||||||
|
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<h3><a href="/inspect">Inspection and Comparison</a></h3>
|
<h3><a href="/inspect">Inspection and Comparison</a></h3>
|
||||||
<h4>Seeing what happened in your project</h4>
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="/inspect/log.html">log</a></li>
|
<li><a href="/inspect/log.html">log</a></li>
|
||||||
<li><a href="/inspect/diff.html">diff</a></li>
|
<li><a href="/inspect/diff.html">diff</a></li>
|
||||||
@ -87,7 +82,6 @@
|
|||||||
|
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<h3><a href="/fixing">Fixing and Changing History</a></h3>
|
<h3><a href="/fixing">Fixing and Changing History</a></h3>
|
||||||
<h4>Cleaning changes up and moving them around</h4>
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="/fixing/rebase.html">rebase</a></li>
|
<li><a href="/fixing/rebase.html">rebase</a></li>
|
||||||
<li><a href="/fixing/revert.html">revert</a></li>
|
<li><a href="/fixing/revert.html">revert</a></li>
|
||||||
@ -98,7 +92,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid_9 home_box" id="content_box">
|
<div class="grid_10 home_box" id="content_box">
|
||||||
{{ content }}
|
{{ content }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
72
about.html
72
about.html
@ -1,69 +1,9 @@
|
|||||||
<div class="grid_12" id="about_me">
|
---
|
||||||
<div class="grid_6 alpha">
|
layout: reference
|
||||||
|
---
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<h2>About Me</h2>
|
<h2>Who Did This?</h2>
|
||||||
<br/>
|
<br/>
|
||||||
|
<p>The Git Reference site was put together by the GitHub
|
||||||
<p>My name is Scott Chacon. I am a
|
team.</p>
|
||||||
<a href="http://github.com/schacon">software developer</a>,
|
|
||||||
<a href="http://git-scm.com">Git evangelist</a>, speaker,
|
|
||||||
<a href="http://progit.org">writer</a>,
|
|
||||||
<a href="http://www.tripit.com/people/schacon">world traveler</a>,
|
|
||||||
father, husband, cat rescuer, baby signer
|
|
||||||
and gorilla tamer.
|
|
||||||
Not neccesarily in that order.</p>
|
|
||||||
<p>This is my little bit-box on the web where I put
|
|
||||||
stuff that people for some inconceivable reason
|
|
||||||
might want to find out about me.</p>
|
|
||||||
<p>I work at <a href="http://github.com">GitHub</a>. And it is awesome.</p>
|
|
||||||
|
|
||||||
<p>Some other interesting things I've done:
|
|
||||||
<ul>
|
|
||||||
<li>Had dinner with the Rwandan Minister of Science and Technology</li>
|
|
||||||
<li>Did a scared E.T. impersonation in front of a crowd in Las Vegas</li>
|
|
||||||
<li>Memorized the "Countries of the World Song" from Anamanics</li>
|
|
||||||
<li>Ran for Congress (US House of Representatives, 11th District, CA)</li>
|
|
||||||
<li>Had a mountain gorilla pull on my leg</li>
|
|
||||||
<li>Ran a trail marathon on Mount Diablo</li>
|
|
||||||
<li>Performed in Oklahoma! with Zach Levi (of NBCs Chuck)</li>
|
|
||||||
<li>Flew over 100,000 miles to 31 cities in 13 countries since joining GitHub</li>
|
|
||||||
</ul>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>If you would like to know any more about any of these, please find me
|
|
||||||
at a GitHub drinkup in your area, I'll tell you all about them.</p>
|
|
||||||
|
|
||||||
<h3>About Me (Professional Edition)</h3>
|
|
||||||
|
|
||||||
<p>I am a <a href="http://git-scm.com">Git</a> evangelist and Ruby
|
|
||||||
developer working on <a href="http://github.com">GitHub.com</a>.
|
|
||||||
I am the author of the <a href="http://progit.org">Pro Git</a> book
|
|
||||||
by Apress, the <a href="https://peepcode.com/products/git-internals-pdf">Git Internals Peepcode <span class="caps">PDF</span></a>
|
|
||||||
as well as the maintainer of the <a href="http://git-scm.com">Git homepage</a>
|
|
||||||
and the <a href="http://book.git-scm.com">Git Community Book</a>.
|
|
||||||
I have presented at <a id="menu_talks" href="#">a bunch of conferences</a>
|
|
||||||
and a number of local groups and have done corporate training on Git
|
|
||||||
across the country.</p>
|
|
||||||
|
|
||||||
<h3>About This Site</h3>
|
|
||||||
|
|
||||||
<p>This site is built using the Jekyll library and hosted on GitHub.
|
|
||||||
The source code used to create this library is publicly available on
|
|
||||||
GitHub as well.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="grid_6 omega">
|
|
||||||
<a href="http://www.flickr.com/photos/chacon/174667918/" title="Jessica and Scott at the Tetons by schacon, on Flickr">
|
|
||||||
<img width="300" src="http://farm1.static.flickr.com/56/174667918_c29a05a91d.jpg" alt="Jessica and Scott at the Tetons" /></a>
|
|
||||||
|
|
||||||
<img width="300" src="http://farm5.static.flickr.com/4045/4318260674_05667bf79e.jpg"/>
|
|
||||||
|
|
||||||
<a href="http://www.flickr.com/photos/fraserspeirs/3395523242/sizes/m/in/set-72157615924425156/">
|
|
||||||
<img width="300" src="http://farm4.static.flickr.com/3442/3395523242_107d9cec71.jpg"/></a>
|
|
||||||
|
|
||||||
<a href="http://www.flickr.com/photos/chacon/206680272/" title="Who is the Monkey? by schacon, on Flickr">
|
|
||||||
<img width="300" src="http://farm1.static.flickr.com/59/206680272_d082087ea0.jpg" alt="Who is the Monkey?" /></a>
|
|
||||||
|
|
||||||
<img width="300" src="http://farm3.static.flickr.com/2636/4318263576_acec667e8b.jpg"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
15
basic/index.html
Normal file
15
basic/index.html
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
layout: reference
|
||||||
|
---
|
||||||
|
|
||||||
|
<div class="box">
|
||||||
|
<h2>Basic Snapshotting</h2>
|
||||||
|
<div class="block">
|
||||||
|
<p>
|
||||||
|
something
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p><a href="/basic">On to Adding Content »</a></p>
|
||||||
|
|
@ -1,9 +1,111 @@
|
|||||||
---
|
---
|
||||||
layout: reference
|
layout: reference
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<h2>Getting and Creating Projects</h2>
|
<h2>Getting and Creating Projects</h2>
|
||||||
<div class="block">
|
<div class="block">
|
||||||
Something.
|
<p>
|
||||||
|
In order to do anything in Git, you have to have a Git repository. This
|
||||||
|
is where Git stores the data for the snapshots you are saving.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
There are two main ways to get a Git repository. One way is to simply
|
||||||
|
initialize a new one from an existing directory, such as a new project or
|
||||||
|
a project new to source control. The second way is to clone one from a
|
||||||
|
public Git repository, as you would do if you wanted a copy or wanted to
|
||||||
|
work with someone on a project. We will cover both of these here.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="box">
|
||||||
|
<h2>
|
||||||
|
<span class="docs">
|
||||||
|
<a href="#">docs</a>
|
||||||
|
<a href="#">book</a>
|
||||||
|
</span>
|
||||||
|
<a name="init">git init</a>
|
||||||
|
<span class="desc">initializes a directory as a Git repository</span>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<div class="block">
|
||||||
|
To create a repository from an existing directory of files, you can
|
||||||
|
simply run <code>git init</code> in that directory. For example,
|
||||||
|
let's say we have a directory with a few files in it, like this:
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
$ cd konichiwa
|
||||||
|
$ ls
|
||||||
|
README hello.rb
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
This is a project where we are writing examples of the "Hello World"
|
||||||
|
program in every language. So far, we just have Ruby, but hey, it's
|
||||||
|
a start. To start version controlling this with Git, we can simply
|
||||||
|
run <code>git init</code>.
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
$ git init
|
||||||
|
Initialized empty Git repository in /opt/konichiwa/.git/
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
Now you can see that there is a <code>.git</code> subdirectory in your
|
||||||
|
project. This is your Git repository where all the data of your
|
||||||
|
project snapshots are stored.
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
$ ls -a
|
||||||
|
. .. .git README hello.rb
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
Congratulations, you now have a skeleton Git repository and can start
|
||||||
|
snapshotting your project.
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="box">
|
||||||
|
<h2>
|
||||||
|
<span class="docs">
|
||||||
|
<a href="#">docs</a>
|
||||||
|
<a href="#">book</a>
|
||||||
|
</span>
|
||||||
|
<a name="clone">git clone</a>
|
||||||
|
<span class="desc">copy a git repository so you can add to it</span>
|
||||||
|
</h2>
|
||||||
|
<div class="usage">
|
||||||
|
git clone (url) [directory]
|
||||||
|
</div>
|
||||||
|
<div class="block">
|
||||||
|
<p>
|
||||||
|
If you need to collaborate with someone on a project, or if you want to
|
||||||
|
get a copy of a project so you can look at or use the code, you will
|
||||||
|
clone it. You simply run the <code>git clone [url]</code> command with
|
||||||
|
the URL of the project you want to copy.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<pre> [example] </pre>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
This will copy the entire history of that project so you have it locally
|
||||||
|
and it will give you a working directory of the main branch of that project
|
||||||
|
so you can look at the code or start editing it. If you change into the
|
||||||
|
new directory, you can see the <code>.git</code> subdirectory - that is
|
||||||
|
where all the project data is.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<pre> [example] </pre>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
By default, Git will create a directory that is the same name as the
|
||||||
|
project in the URL you give it - basically whatever is after the last slash
|
||||||
|
of the URL. If you want something different, you can just put it at the
|
||||||
|
end of the command, after the URL.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p><a href="/basic">On to Basic Snapshotting »</a></p>
|
||||||
|
@ -29,7 +29,26 @@ body {
|
|||||||
#reflist h4 { font-size: 0.9em; }
|
#reflist h4 { font-size: 0.9em; }
|
||||||
#reflist .block { margin: 0; padding: 0; }
|
#reflist .block { margin: 0; padding: 0; }
|
||||||
|
|
||||||
.box pre { background: #ffe; }
|
code { background: #ffe; padding: 2px 5px; }
|
||||||
|
|
||||||
|
.box pre {
|
||||||
|
margin-top: 10px;
|
||||||
|
padding: 8px;
|
||||||
|
background: #ffe;
|
||||||
|
}
|
||||||
|
|
||||||
|
.note {
|
||||||
|
float: right;
|
||||||
|
border: 10px;
|
||||||
|
padding: 8px;
|
||||||
|
background: #dfd;
|
||||||
|
border: 1px solid #8a8;
|
||||||
|
width: 120px;
|
||||||
|
}
|
||||||
|
.note h3 {
|
||||||
|
font-size: 1.1em;
|
||||||
|
color: #353;
|
||||||
|
}
|
||||||
|
|
||||||
ul#menu {
|
ul#menu {
|
||||||
background: #c9182f;
|
background: #c9182f;
|
||||||
@ -123,15 +142,33 @@ h1 a {
|
|||||||
margin:-10px -10px 0 -10px;
|
margin:-10px -10px 0 -10px;
|
||||||
padding:6px 12px;
|
padding:6px 12px;
|
||||||
}
|
}
|
||||||
|
.box h2 .desc {
|
||||||
|
margin-left: 20px;
|
||||||
|
text-transform:none;
|
||||||
|
color: #aaa;
|
||||||
|
}
|
||||||
.box h2 a,
|
.box h2 a,
|
||||||
.box h2 a.visible {
|
.box h2 a.visible {
|
||||||
|
background-color:#111;
|
||||||
color:#fff;
|
color:#fff;
|
||||||
background:#333 url("../img/switch_minus.gif") 97% 50% no-repeat;
|
display:inline;
|
||||||
display:block;
|
|
||||||
padding:6px 12px;
|
padding:6px 12px;
|
||||||
margin:-6px -12px;
|
margin:-6px -12px;
|
||||||
border:none;
|
border:none;
|
||||||
|
text-transform:none;
|
||||||
}
|
}
|
||||||
|
.box h2 .docs {
|
||||||
|
color: #999;
|
||||||
|
display:inline;
|
||||||
|
float: right;
|
||||||
|
background-color:#333;
|
||||||
|
}
|
||||||
|
.box h2 .docs a {
|
||||||
|
background-color:#333;
|
||||||
|
padding:0;
|
||||||
|
margin:0;
|
||||||
|
}
|
||||||
|
|
||||||
.grid_4 .box h2 a {
|
.grid_4 .box h2 a {
|
||||||
background-position: 97% 50%;
|
background-position: 97% 50%;
|
||||||
}
|
}
|
||||||
@ -143,10 +180,6 @@ h1 a {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.box h2 a.hidden,
|
|
||||||
.box h2 a.hidden:hover {
|
|
||||||
background-image: url("../img/switch_plus.gif");
|
|
||||||
}
|
|
||||||
.box h2 a:hover {
|
.box h2 a:hover {
|
||||||
background-color:#111;
|
background-color:#111;
|
||||||
}
|
}
|
||||||
|
@ -105,6 +105,7 @@ layout: reference
|
|||||||
properly.
|
properly.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p><a href="/creating/">On to Getting and Creating Projects »</a></p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<p><a href="/creating">On to Getting and Creating Projects »</a></p>
|
||||||
|
Loading…
Reference in New Issue
Block a user