@git / git-reference / commits / f091518

getting and creating almost done

Scott Chacon committed Jun 3, 2010 at 16:25 UTC f09151836a39acc3b68f64a9e4f41b77bc2966a1
6 files changed +173 -88
_layouts/reference.html
+5 -11
@@ -33,19 +33,17 @@
33  
34 </div>
35
36 - <div class="grid_3" id="reflist">
36 + <div class="grid_2" id="reflist">
37 <div class="block">
38 <h3><a href="/creating">Getting and Creating Projects</a></h3>
39 - <h4>Starting or copying a Git repository</h4>
39 <ul>
41 - <li><a href="/creating/init.html">init</a></li>
42 - <li><a href="/creating/clone.html">clone</a></li>
40 + <li><a href="/creating/#init">init</a></li>
41 + <li><a href="/creating/#clone">clone</a></li>
42 </ul>
43 </div>
44
45 <div class="block">
46 <h3><a href="/basic">Basic Snapshotting</a></h3>
48 - <h4>Saving your work</h4>
47 <ul>
48 <li><a href="/basic/add.html">add</a></li>
49 <li><a href="/basic/status.html">status</a></li>
@@ -58,7 +56,6 @@
56
57 <div class="block">
58 <h3><a href="/branching">Branching and Merging</a></h3>
61 - <h4>Working in contexts</h4>
59 <ul>
60 <li><a href="/branching/branch.html">branch</a></li>
61 <li><a href="/branching/merge.html">merge</a></li>
@@ -69,7 +66,6 @@
66
67 <div class="block">
68 <h3><a href="/remotes">Sharing and Updating Projects</a></h3>
72 - <h4>Using Git to work with others</h4>
69 <ul>
70 <li><a href="/remotes/fetch-pull.html">fetch, pull</a></li>
71 <li><a href="/remotes/push.html">push</a></li>
@@ -78,7 +74,6 @@
74
75 <div class="block">
76 <h3><a href="/inspect">Inspection and Comparison</a></h3>
81 - <h4>Seeing what happened in your project</h4>
77 <ul>
78 <li><a href="/inspect/log.html">log</a></li>
79 <li><a href="/inspect/diff.html">diff</a></li>
@@ -87,7 +82,6 @@
82
83 <div class="block">
84 <h3><a href="/fixing">Fixing and Changing History</a></h3>
90 - <h4>Cleaning changes up and moving them around</h4>
85 <ul>
86 <li><a href="/fixing/rebase.html">rebase</a></li>
87 <li><a href="/fixing/revert.html">revert</a></li>
@@ -98,9 +92,9 @@
92
93 </div>
94
101 - <div class="grid_9 home_box" id="content_box">
95 + <div class="grid_10 home_box" id="content_box">
96 {{ content }}
103 - </div>
97 + </div>
98
99 <div class="clear"></div>
100 </div>
about.html
+8 -68
@@ -1,69 +1,9 @@
1 -<div class="grid_12" id="about_me">
2 - <div class="grid_6 alpha">
3 - <div class="box">
4 - <h2>About Me</h2>
5 - <br/>
6 -
7 - <p>My name is Scott Chacon. I am a
8 - <a href="http://github.com/schacon">software developer</a>,
9 - <a href="http://git-scm.com">Git evangelist</a>, speaker,
10 - <a href="http://progit.org">writer</a>,
11 - <a href="http://www.tripit.com/people/schacon">world traveler</a>,
12 - father, husband, cat rescuer, baby signer
13 - and gorilla tamer.
14 - Not neccesarily in that order.</p>
15 - <p>This is my little bit-box on the web where I put
16 - stuff that people for some inconceivable reason
17 - might want to find out about me.</p>
18 - <p>I work at <a href="http://github.com">GitHub</a>. And it is awesome.</p>
19 -
20 - <p>Some other interesting things I've done:
21 - <ul>
22 - <li>Had dinner with the Rwandan Minister of Science and Technology</li>
23 - <li>Did a scared E.T. impersonation in front of a crowd in Las Vegas</li>
24 - <li>Memorized the "Countries of the World Song" from Anamanics</li>
25 - <li>Ran for Congress (US House of Representatives, 11th District, CA)</li>
26 - <li>Had a mountain gorilla pull on my leg</li>
27 - <li>Ran a trail marathon on Mount Diablo</li>
28 - <li>Performed in Oklahoma! with Zach Levi (of NBCs Chuck)</li>
29 - <li>Flew over 100,000 miles to 31 cities in 13 countries since joining GitHub</li>
30 - </ul>
31 - </p>
32 -
33 - <p>If you would like to know any more about any of these, please find me
34 - at a GitHub drinkup in your area, I'll tell you all about them.</p>
35 -
36 - <h3>About Me (Professional Edition)</h3>
37 -
38 - <p>I am a <a href="http://git-scm.com">Git</a> evangelist and Ruby
39 - developer working on <a href="http://github.com">GitHub.com</a>.
40 - I am the author of the <a href="http://progit.org">Pro Git</a> book
41 - by Apress, the <a href="https://peepcode.com/products/git-internals-pdf">Git Internals Peepcode <span class="caps">PDF</span></a>
42 - as well as the maintainer of the <a href="http://git-scm.com">Git homepage</a>
43 - and the <a href="http://book.git-scm.com">Git Community Book</a>.
44 - I have presented at <a id="menu_talks" href="#">a bunch of conferences</a>
45 - and a number of local groups and have done corporate training on Git
46 - across the country.</p>
47 -
48 - <h3>About This Site</h3>
49 -
50 - <p>This site is built using the Jekyll library and hosted on GitHub.
51 - The source code used to create this library is publicly available on
52 - GitHub as well.</p>
53 - </div>
54 - </div>
55 - <div class="grid_6 omega">
56 - <a href="http://www.flickr.com/photos/chacon/174667918/" title="Jessica and Scott at the Tetons by schacon, on Flickr">
57 - <img width="300" src="http://farm1.static.flickr.com/56/174667918_c29a05a91d.jpg" alt="Jessica and Scott at the Tetons" /></a>
58 -
59 - <img width="300" src="http://farm5.static.flickr.com/4045/4318260674_05667bf79e.jpg"/>
60 -
61 - <a href="http://www.flickr.com/photos/fraserspeirs/3395523242/sizes/m/in/set-72157615924425156/">
62 - <img width="300" src="http://farm4.static.flickr.com/3442/3395523242_107d9cec71.jpg"/></a>
63 -
64 - <a href="http://www.flickr.com/photos/chacon/206680272/" title="Who is the Monkey? by schacon, on Flickr">
65 - <img width="300" src="http://farm1.static.flickr.com/59/206680272_d082087ea0.jpg" alt="Who is the Monkey?" /></a>
66 -
67 - <img width="300" src="http://farm3.static.flickr.com/2636/4318263576_acec667e8b.jpg"/>
68 - </div>
1 +---
2 +layout: reference
3 +---
4 +<div class="box">
5 + <h2>Who Did This?</h2>
6 + <br/>
7 + <p>The Git Reference site was put together by the GitHub
8 + team.</p>
9 </div>
basic/index.html new
+15
@@ -0,0 +1,15 @@
1 +---
2 +layout: reference
3 +---
4 +
5 +<div class="box">
6 + <h2>Basic Snapshotting</h2>
7 + <div class="block">
8 + <p>
9 + something
10 + </p>
11 + </div>
12 +</div>
13 +
14 +<p><a href="/basic">On to Adding Content &#187;</a></p>
15 +
creating/index.html
+103 -1
@@ -1,9 +1,111 @@
1 ---
2 layout: reference
3 ---
4 +
5 <div class="box">
6 <h2>Getting and Creating Projects</h2>
7 <div class="block">
7 - Something.
8 + <p>
9 + In order to do anything in Git, you have to have a Git repository. This
10 + is where Git stores the data for the snapshots you are saving.
11 + </p>
12 +
13 + <p>
14 + There are two main ways to get a Git repository. One way is to simply
15 + initialize a new one from an existing directory, such as a new project or
16 + a project new to source control. The second way is to clone one from a
17 + public Git repository, as you would do if you wanted a copy or wanted to
18 + work with someone on a project. We will cover both of these here.
19 + </p>
20 </div>
21 </div>
22 +
23 +<div class="box">
24 + <h2>
25 + <span class="docs">
26 + <a href="#">docs</a> &nbsp;
27 + <a href="#">book</a>
28 + </span>
29 + <a name="init">git init</a>
30 + <span class="desc">initializes a directory as a Git repository</span>
31 + </h2>
32 +
33 + <div class="block">
34 + To create a repository from an existing directory of files, you can
35 + simply run <code>git init</code> in that directory. For example,
36 + let's say we have a directory with a few files in it, like this:
37 +
38 +<pre>
39 +$ cd konichiwa
40 +$ ls
41 +README hello.rb
42 +</pre>
43 +
44 + This is a project where we are writing examples of the "Hello World"
45 + program in every language. So far, we just have Ruby, but hey, it's
46 + a start. To start version controlling this with Git, we can simply
47 + run <code>git init</code>.
48 +
49 +<pre>
50 +$ git init
51 +Initialized empty Git repository in /opt/konichiwa/.git/
52 +</pre>
53 +
54 + Now you can see that there is a <code>.git</code> subdirectory in your
55 + project. This is your Git repository where all the data of your
56 + project snapshots are stored.
57 +
58 +<pre>
59 +$ ls -a
60 +. .. .git README hello.rb
61 +</pre>
62 +
63 + Congratulations, you now have a skeleton Git repository and can start
64 + snapshotting your project.
65 +
66 + </div>
67 +</div>
68 +
69 +<div class="box">
70 + <h2>
71 + <span class="docs">
72 + <a href="#">docs</a> &nbsp;
73 + <a href="#">book</a>
74 + </span>
75 + <a name="clone">git clone</a>
76 + <span class="desc">copy a git repository so you can add to it</span>
77 + </h2>
78 + <div class="usage">
79 + git clone (url) [directory]
80 + </div>
81 + <div class="block">
82 + <p>
83 + If you need to collaborate with someone on a project, or if you want to
84 + get a copy of a project so you can look at or use the code, you will
85 + clone it. You simply run the <code>git clone [url]</code> command with
86 + the URL of the project you want to copy.
87 + </p>
88 +
89 +<pre> [example] </pre>
90 +
91 + <p>
92 + This will copy the entire history of that project so you have it locally
93 + and it will give you a working directory of the main branch of that project
94 + so you can look at the code or start editing it. If you change into the
95 + new directory, you can see the <code>.git</code> subdirectory - that is
96 + where all the project data is.
97 + </p>
98 +
99 +<pre> [example] </pre>
100 +
101 + <p>
102 + By default, Git will create a directory that is the same name as the
103 + project in the URL you give it - basically whatever is after the last slash
104 + of the URL. If you want something different, you can just put it at the
105 + end of the command, after the URL.
106 + </p>
107 +
108 + </div>
109 +</div>
110 +
111 +<p><a href="/basic">On to Basic Snapshotting &#187;</a></p>
css/layout.css
+40 -7
@@ -29,7 +29,26 @@ body {
29 #reflist h4 { font-size: 0.9em; }
30 #reflist .block { margin: 0; padding: 0; }
31
32 -.box pre { background: #ffe; }
32 +code { background: #ffe; padding: 2px 5px; }
33 +
34 +.box pre {
35 + margin-top: 10px;
36 + padding: 8px;
37 + background: #ffe;
38 +}
39 +
40 +.note {
41 + float: right;
42 + border: 10px;
43 + padding: 8px;
44 + background: #dfd;
45 + border: 1px solid #8a8;
46 + width: 120px;
47 +}
48 +.note h3 {
49 + font-size: 1.1em;
50 + color: #353;
51 +}
52
53 ul#menu {
54 background: #c9182f;
@@ -123,15 +142,33 @@ h1 a {
142 margin:-10px -10px 0 -10px;
143 padding:6px 12px;
144 }
145 +.box h2 .desc {
146 + margin-left: 20px;
147 + text-transform:none;
148 + color: #aaa;
149 +}
150 .box h2 a,
151 .box h2 a.visible {
152 + background-color:#111;
153 color:#fff;
129 - background:#333 url("../img/switch_minus.gif") 97% 50% no-repeat;
130 - display:block;
154 + display:inline;
155 padding:6px 12px;
156 margin:-6px -12px;
157 border:none;
158 + text-transform:none;
159 +}
160 +.box h2 .docs {
161 + color: #999;
162 + display:inline;
163 + float: right;
164 + background-color:#333;
165 +}
166 +.box h2 .docs a {
167 + background-color:#333;
168 + padding:0;
169 + margin:0;
170 }
171 +
172 .grid_4 .box h2 a {
173 background-position: 97% 50%;
174 }
@@ -143,10 +180,6 @@ h1 a {
180 }
181
182
146 -.box h2 a.hidden,
147 -.box h2 a.hidden:hover {
148 - background-image: url("../img/switch_plus.gif");
149 -}
183 .box h2 a:hover {
184 background-color:#111;
185 }
index.html
+2 -1
@@ -105,6 +105,7 @@ layout: reference
105 properly.
106 </p>
107
108 - <p><a href="/creating/">On to Getting and Creating Projects &#187;</a></p>
108 </div>
109 </div>
110 +
111 +<p><a href="/creating">On to Getting and Creating Projects &#187;</a></p>