From f09151836a39acc3b68f64a9e4f41b77bc2966a1 Mon Sep 17 00:00:00 2001 From: Scott Chacon Date: Thu, 3 Jun 2010 16:25:55 +0200 Subject: [PATCH] getting and creating almost done --- _layouts/reference.html | 16 ++----- about.html | 76 ++++------------------------- basic/index.html | 15 ++++++ creating/index.html | 104 +++++++++++++++++++++++++++++++++++++++- css/layout.css | 47 +++++++++++++++--- index.html | 3 +- 6 files changed, 173 insertions(+), 88 deletions(-) create mode 100644 basic/index.html diff --git a/_layouts/reference.html b/_layouts/reference.html index 305df02..beebc53 100755 --- a/_layouts/reference.html +++ b/_layouts/reference.html @@ -33,19 +33,17 @@   -
+

Getting and Creating Projects

-

Starting or copying a Git repository

Basic Snapshotting

-

Saving your work

  • add
  • status
  • @@ -58,7 +56,6 @@

    Branching and Merging

    -

    Working in contexts

    • branch
    • merge
    • @@ -69,7 +66,6 @@

      Sharing and Updating Projects

      -

      Using Git to work with others

      • fetch, pull
      • push
      • @@ -78,7 +74,6 @@

        Inspection and Comparison

        -

        Seeing what happened in your project

        diff --git a/about.html b/about.html index 293fb7e..02b0199 100644 --- a/about.html +++ b/about.html @@ -1,69 +1,9 @@ -
        -
        -
        -

        About Me

        -
        - -

        My name is Scott Chacon. I am a - software developer, - Git evangelist, speaker, - writer, - world traveler, - father, husband, cat rescuer, baby signer - and gorilla tamer. - Not neccesarily in that order.

        -

        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.

        -

        I work at GitHub. And it is awesome.

        - -

        Some other interesting things I've done: -

          -
        • Had dinner with the Rwandan Minister of Science and Technology
        • -
        • Did a scared E.T. impersonation in front of a crowd in Las Vegas
        • -
        • Memorized the "Countries of the World Song" from Anamanics
        • -
        • Ran for Congress (US House of Representatives, 11th District, CA)
        • -
        • Had a mountain gorilla pull on my leg
        • -
        • Ran a trail marathon on Mount Diablo
        • -
        • Performed in Oklahoma! with Zach Levi (of NBCs Chuck)
        • -
        • Flew over 100,000 miles to 31 cities in 13 countries since joining GitHub
        • -
        -

        - -

        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.

        - -

        About Me (Professional Edition)

        - -

        I am a Git evangelist and Ruby - developer working on GitHub.com. - I am the author of the Pro Git book - by Apress, the Git Internals Peepcode PDF - as well as the maintainer of the Git homepage - and the Git Community Book. - I have presented at a bunch of conferences - and a number of local groups and have done corporate training on Git - across the country.

        - -

        About This Site

        - -

        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.

        -
        -
        -
        - - Jessica and Scott at the Tetons - - - - - - - - Who is the Monkey? - - -
        +--- +layout: reference +--- +
        +

        Who Did This?

        +
        +

        The Git Reference site was put together by the GitHub + team.

        diff --git a/basic/index.html b/basic/index.html new file mode 100644 index 0000000..068eead --- /dev/null +++ b/basic/index.html @@ -0,0 +1,15 @@ +--- +layout: reference +--- + +
        +

        Basic Snapshotting

        +
        +

        + something +

        +
        +
        + +

        On to Adding Content »

        + diff --git a/creating/index.html b/creating/index.html index 7213879..9b1e543 100644 --- a/creating/index.html +++ b/creating/index.html @@ -1,9 +1,111 @@ --- layout: reference --- +

        Getting and Creating Projects

        - Something. +

        + 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. +

        + +

        + 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. +

        + +
        +

        + + docs   + book + + git init + initializes a directory as a Git repository +

        + +
        + To create a repository from an existing directory of files, you can + simply run git init in that directory. For example, + let's say we have a directory with a few files in it, like this: + +
        +$ cd konichiwa
        +$ ls
        +README   hello.rb
        +
        + + 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 git init. + +
        +$ git init
        +Initialized empty Git repository in /opt/konichiwa/.git/
        +
        + + Now you can see that there is a .git subdirectory in your + project. This is your Git repository where all the data of your + project snapshots are stored. + +
        +$ ls -a
        +.        ..       .git     README   hello.rb
        +
        + + Congratulations, you now have a skeleton Git repository and can start + snapshotting your project. + +
        +
        + +
        +

        + + docs   + book + + git clone + copy a git repository so you can add to it +

        +
        + git clone (url) [directory] +
        +
        +

        + 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 git clone [url] command with + the URL of the project you want to copy. +

        + +
         [example] 
        + +

        + 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 .git subdirectory - that is + where all the project data is. +

        + +
         [example] 
        + +

        + 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. +

        + +
        +
        + +

        On to Basic Snapshotting »

        diff --git a/css/layout.css b/css/layout.css index 949c5db..cb81197 100755 --- a/css/layout.css +++ b/css/layout.css @@ -29,7 +29,26 @@ body { #reflist h4 { font-size: 0.9em; } #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 { background: #c9182f; @@ -123,15 +142,33 @@ h1 a { margin:-10px -10px 0 -10px; padding:6px 12px; } +.box h2 .desc { + margin-left: 20px; + text-transform:none; + color: #aaa; +} .box h2 a, .box h2 a.visible { + background-color:#111; color:#fff; - background:#333 url("../img/switch_minus.gif") 97% 50% no-repeat; - display:block; + display:inline; padding:6px 12px; margin:-6px -12px; 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 { 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 { background-color:#111; } diff --git a/index.html b/index.html index 09bc2f5..133c415 100644 --- a/index.html +++ b/index.html @@ -105,6 +105,7 @@ layout: reference properly.

        -

        On to Getting and Creating Projects »

      + +

      On to Getting and Creating Projects »