SlideShare a Scribd company logo
Smacking Git Around
      by Scott Chacon
Me
Scott Chacon
github.com/schacon
“Scott Chacon has an
understandable but borderline
unhealthy obsession with Git”
                  - Ilya Grigorik
                       igvita.com
git-scm.com
book.git-scm.com
schacon@gmail.com
</me>
previously, on Git...
GIT
Git
image by matthew mccullough
Scott Chacon
Scott   Scott Chacon
                         is a Git




 v1         v2             v3
98ca9..                        34ac2..                     f30ab..
commit                         commit                      commit
                     size                           size                        size
  tree                           tree                        tree
               0de24                          184ca                       92ec2
 author                         parent                      parent
               Scott                          98ca9                       34ac2
committer                       author                      author
               Scott                          Scott                       Scott
                               committer                   committer
initial commit of my project                  Scott                       Scott
                               fixed bug #1328 - stack     add feature #32 - ability to
                               overflow under certain      add new formats to the central




      snapshot A                    snapshot B                   snapshot C
98ca9..
                                                                  e8455..
commit                size
                                                            blob                   size
                                        0de24..
                                       0de24..
  tree         0de24
                                                           == LICENSE:
                                tree            size
 parent         nil
                                                           (The MIT License)
 author        Scott            blob    e8455 README       Copyright (c) 2007 Tom Preston-
committer      Scott
                                tree    10af9 lib          Permission is hereby granted, f
my commit message goes here                                ree of charge, to any person ob
and it is really, really cool


                                                                  bc52a..
                                       10af9..
                                                            blob                   size
                                tree             size
                                                           require 'grit/index'
                                blob    bc52a mylib.rb     require 'grit/status'

                                tree    b70f8 inc
                                                           module Grit
                                                             class << self
                                                               attr_accessor :debug



                                       b70f8..
                                                                  0ad1a..
                                tree                size
                                                                                   size
                                                            blob
                                blob    0ad1a tricks.rb
                                                           require 'grit/git-ruby/reposi
                                                           require 'grit/git-ruby/file_i

                                                           module Grit
                                                             module Tricks
98ca9..
                                                                  e8455..
commit                size
                                                            blob                   size
                                        0de24..
                                       0de24..
  tree         0de24
                                                           == LICENSE:
                                tree            size
 parent         nil
                                                           (The MIT License)
 author        Scott            blob    e8455 README       Copyright (c) 2007 Tom Preston-
committer      Scott
                                tree    10af9 lib          Permission is hereby granted, f
my commit message goes here                                ree of charge, to any person ob
and it is really, really cool


                                                                  bc52a..
                                       10af9..
                                                            blob                   size
                                tree             size
                                                           require 'grit/index'
                                blob    bc52a mylib.rb     require 'grit/status'

                                tree    b70f8 inc
                                                           module Grit
                                                             class << self
                                                               attr_accessor :debug



                                       b70f8..
                                                                  0ad1a..
                                tree                size
                                                                                   size
                                                            blob
                                blob    0ad1a tricks.rb
                                                           require 'grit/git-ruby/reposi
                                                           require 'grit/git-ruby/file_i

                                                           module Grit
                                                             module Tricks
0de24..
     22d8858e8513666bf91b82bd2939ec7b0d1974da
stable           master




98ca9    34ac2   f30ab




         a23fe   3acd1




                 topic
stable           master




98ca9    34ac2   f30ab




         a23fe   3acd1




                 topic
stable           master




98ca9    34ac2   f30ab




         a23fe   3acd1




                 topic
stable           master




98ca9    34ac2   f30ab




         a23fe   3acd1




                 topic
$ time git checkout -b newbranch
Switched to a new branch quot;newbranchquot;

real	 0m0.040s
user	 0m0.003s
sys	0m0.008s
$ time git checkout -b newbranch
Switched to a new branch quot;newbranchquot;

real	 0m0.040s
user	 0m0.003s
sys	0m0.008s
master




develop




topic
distributed
development


          image by matthew mccullough
ccf03da00eca1b60a489354c1278c27f1fbc55dc
a640106f173c5be59ed5757cf33f568b3e10994f
c51a137df64b8ed2f8d84ad62df7b49b1c409906
7e06f7f8d471d5ccbe958fcfaef0fc48ff1a3def
dafe95908f7b9cbd2697f04544b68904a6c59aac
2934b685f5dfd2b12c5d7d35d07c6058640f0581
d3b47a90ef9bf2d7bbc5a7cf2b2f27eef4a08f04
dbfeee0f5717d9978788da17cd6853316c92744a
864734938d4044fc5e713e4818f60ecb4f460525
3793a0108438a539f958236dbb9f4ea98b6b70ea
00a60fa1439f082128c1ec03ec3c73acab074d31
6ba82b4879f04de35ffe2ef02d50df0adf184fad
861020b6afeeec245afa2f864c72f5c2588295be
505f3128a573bfe1d23aec2acef83c34c3cbd8be
213e6f8761df038ab0b7c34a9fc4c2c3ce6c8b43
798a8088bcc7cf47fdb33a9d79e398220b660f88
C
fast
efficient
100k repos
80k users
</git-recap>
Git Tips and Tricks
Tips and Tricks
Selection and Ranges

   Data Munging

     Debugging

    Customizing
Selection and Ranges
Revision Selection
Revision Selection
  alternate ways to refer to
 objects or ranges of objects
Revision Selection
        full sha-1
       partial sha-1
    branch or tag name
       caret parent
        tilde spec
        blob spec
      relative specs
          ranges
Full SHA1
6e453f523fa1da50ecb04431101112b3611c6a4d
Partial SHA1
6e453f523fa1da50ecb04431101112b3611c6a4d

6e453f523fa1da50

6e453
Branch, Remote
  or Tag Name
     v1.0
    default
   m/cupcake
Caret Parent

   default^2

2nd parent of ‘default’
b3be1      a09c6      df2fa   c36ae




5ec47   ce0e4      2f45e      4eadf   2fbb3    18cae



                jess/master                   master
master^
        b3be1      a09c6      df2fa   c36ae




5ec47   ce0e4      2f45e      4eadf   2fbb3    18cae



                jess/master                   master
master^2
        b3be1      a09c6      df2fa   c36ae




5ec47   ce0e4      2f45e      4eadf   2fbb3    18cae



                jess/master                   master
Tilde Spec

    default~2

grandparent of ‘default’
 (parent of the parent)
master~2
        b3be1      a09c6      df2fa   c36ae




5ec47   ce0e4      2f45e      4eadf   2fbb3    18cae



                jess/master                   master
master^^^2
           master~2^2
        b3be1      a09c6      df2fa   c36ae




5ec47   ce0e4      2f45e      4eadf   2fbb3    18cae



                jess/master                   master
master^^^2
           master~2^2
        b3be1      a09c6      df2fa   c36ae




5ec47   ce0e4      2f45e      4eadf   2fbb3    18cae



                jess/master                   master
master^^^2
           master~2^2
        b3be1      a09c6      df2fa   c36ae




5ec47   ce0e4      2f45e      4eadf   2fbb3    18cae



                jess/master                   master
Blob Spec

default:path/to/file

blob of that file in ‘default’ commit
Relative Specs

   master@{yesterday}

the commit ‘master’ was at yesterday
Relative Specs

           master@{5}

the 5th prior value of ‘master’ (locally)
Ranges
Ranges

      ce0e4..e4272

every commit reachable by e4272
  that is not reachable by ce034
Ranges

      [old]..[new]

every commit reachable by [new]
  that is not reachable by [old]
Ranges

      ce0e4..

everything since a commit
“Reachability”
jess/master..master
        b3be1      a09c6      df2fa   c36ae




5ec47   ce0e4      2f45e      4eadf   2fbb3    18cae



                jess/master                   master
jess/master..master
        b3be1      a09c6      df2fa   c36ae




5ec47   ce0e4      2f45e      4eadf   2fbb3    18cae



                jess/master                   master
jess/master..master
        b3be1      a09c6      df2fa   c36ae




5ec47   ce0e4      2f45e      4eadf   2fbb3    18cae



                jess/master                   master
jess/master..master
        b3be1      a09c6      df2fa   c36ae




5ec47   ce0e4      2f45e      4eadf   2fbb3    18cae



                jess/master                   master
jess/master..master
        b3be1      a09c6      df2fa   c36ae




5ec47   ce0e4      2f45e      4eadf   2fbb3    18cae



                jess/master                   master
jess/master..master
        b3be1      a09c6      df2fa   c36ae




5ec47   ce0e4      2f45e      4eadf   2fbb3    18cae



                jess/master                   master
jess/master..master
        b3be1      a09c6      df2fa   c36ae




5ec47   ce0e4      2f45e      4eadf   2fbb3    18cae



                jess/master                   master
jess/master..master
        b3be1      a09c6      df2fa   c36ae




5ec47   ce0e4      2f45e      4eadf   2fbb3    18cae



                jess/master                   master
jess/master..c36ae
         b3be1      a09c6      df2fa   c36ae




5ec47    ce0e4      2f45e      4eadf   2fbb3    18cae



                 jess/master                   master
jess/master..c36ae
         b3be1      a09c6      df2fa   c36ae




5ec47    ce0e4      2f45e      4eadf   2fbb3    18cae



                 jess/master                   master
jess/master..c36ae
         b3be1      a09c6      df2fa   c36ae




5ec47    ce0e4      2f45e      4eadf   2fbb3    18cae



                 jess/master                   master
jess/master..c36ae
         b3be1      a09c6      df2fa   c36ae




5ec47    ce0e4      2f45e      4eadf   2fbb3    18cae



                 jess/master                   master
Advanced Log
Log Subsets
what am I going to
      push?
git log origin/master..
C1
origin/master        master   HEAD




                C0
C4   master   HEAD




                     C3




                     C2




                C1
origin/master




                C0
C7   C4
origin/master                  master   HEAD




                C6   C3




                C5   C2




                C1


                          git fetch origin
                C0
C7    C4
origin/master                 master   HEAD




                C6    C3




                C5    C2




                C1


                     git log origin/master..
                C0
C7   C4
origin/master               master   HEAD




                C6   C3




                C5   C2




                C1
                           git log
                     origin/master..HEAD
                C0
C7   C4
origin/master               master   HEAD




                C6   C3




                C5   C2




                C1
                           git log
                     origin/master..HEAD
                C0
C7   C4
origin/master               master   HEAD




                C6   C3




                C5   C2




                C1
                           git log
                     origin/master..HEAD
                C0
C7   C4
origin/master               master   HEAD




                C6   C3




                C5   C2




                C1
                           git log
                     origin/master..HEAD
                C0
commit 72d404debaa804fca82fd9cf710fbde48c7305c6
Author: Shawn O. Pearce <spearce@spearce.org>
Date:   Sun Oct 12 13:13:59 2008 -0700

   test-lib: fix broken printf

   b8eecafd888d219633f4c29e8b6a90fc21a46dfd introduced usage of
   printf without a format string.

   Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

commit 969c877506cf8cc760c7b251fef6c5b6850bfc19
Author: Jeff King <peff@peff.net>
Date:   Sun Oct 12 00:06:11 2008 -0400

   git apply --directory broken for new files

   We carefully verify that the input to git-apply is sane,
   including cross-checking that the filenames we see in quot;+++quot;
   headers match what was provided on the command line of quot;diff
   --gitquot;. When --directory is used, however, we ended up
   comparing the unadorned name to one with the prepended root,
   causing us to complain about a mismatch.

   We simply need to prepend the root directory, if any, when
   pulling the name out of the git header.

commit ff74126c03a8dfd04e7533573a5c420f2a7112ac
Author: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Date:   Fri Oct 10 13:42:12 2008 +0200

   rebase -i: do not fail when there is no commit to cherry-pick
commit 72d404debaa804fca82fd9cf710fbde48c7305c6
C4   Author: Shawn O. Pearce <spearce@spearce.org>
     Date:   Sun Oct 12 13:13:59 2008 -0700

        test-lib: fix broken printf

        b8eecafd888d219633f4c29e8b6a90fc21a46dfd introduced usage of
        printf without a format string.

        Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

     commit 969c877506cf8cc760c7b251fef6c5b6850bfc19
C3   Author: Jeff King <peff@peff.net>
     Date:   Sun Oct 12 00:06:11 2008 -0400

        git apply --directory broken for new files

        We carefully verify that the input to git-apply is sane,
        including cross-checking that the filenames we see in quot;+++quot;
        headers match what was provided on the command line of quot;diff
        --gitquot;. When --directory is used, however, we ended up
        comparing the unadorned name to one with the prepended root,
        causing us to complain about a mismatch.

        We simply need to prepend the root directory, if any, when
        pulling the name out of the git header.

     commit ff74126c03a8dfd04e7533573a5c420f2a7112ac
C2   Author: Johannes Schindelin <Johannes.Schindelin@gmx.de>
     Date:   Fri Oct 10 13:42:12 2008 +0200

        rebase -i: do not fail when there is no commit to cherry-pick
C7   C4
origin/master                master   HEAD




                C6   C3




                C5   C2




                C1
                           git log
                     origin/master .. HEAD
                C0
C7   C4
origin/master                master   HEAD




                C6   C3




                C5   C2




                C1
                            git log
                      HEAD .. origin/master
                C0
C7   C4
origin/master                 master   HEAD




                C6   C3




                C5   C2




                C1
                            git log
                      HEAD .. origin/master
                C0
                     “commits in origin/master
                         not in HEAD”
git log origin/master..

git log origin/master..HEAD

git log origin/master..master

git log master ^origin/master

git log master --not origin/master
git log HEAD ^origin/master
git log HEAD ^origin/master
git log master topic1 ^origin/master
origin/master



    C1



    C0
master



                 C3
origin/master



    C1



    C0
experiment


                           C10




                            C9




                            C8
                master



                 C3
origin/master



    C1



    C0
experiment


                           C10
                master
origin/master


                            C9
    C7           C5



    C6           C4         C8



    C2           C3



    C1



    C0
which changes aren’t in
     experiment?
git log origin/master master ^experiment

                                  experiment


                                    C10
                         master
         origin/master


                                     C9
             C7           C5



             C6           C4         C8



             C2           C3



             C1



             C0
git log origin/master master ^experiment

                                  experiment


                                    C10
                         master
         origin/master


                                     C9
             C7           C5



             C6           C4         C8



             C2           C3



             C1



             C0
git log origin/master master ^experiment

                                  experiment


                                    C10
                         master
         origin/master


                                     C9
             C7           C5



             C6           C4         C8



             C2           C3



             C1



             C0
git log origin/master master ^experiment

                                  experiment


                                    C10
                         master
         origin/master


                                     C9
             C7           C5



             C6           C4         C8



             C2           C3



             C1



             C0
git log origin/master master ^experiment

                                  experiment


                                    C10
                         master
         origin/master


                                     C9
             C7           C5



             C6           C4         C8



             C2           C3



             C1



             C0
git log origin/master master ^experiment

                                  experiment


                                    C10
                         master
         origin/master


                                     C9
             C7           C5



             C6           C4         C8



             C2           C3



             C1



             C0
git log origin/master master ^experiment

                                  experiment


                                    C10
                         master
         origin/master


                                     C9
             C7           C5



             C6           C4         C8



             C2           C3



             C1



             C0
git log --graph
git log --pretty=oneline --graph
gitk
gitk 6d13f..41aba
Revision Diffs
git diff revA revB
$ echo ‘version one’ > test
         $ git add test
         $ git commit -m ‘C1’




master




 C1
$ git checkout -b topic
         $ echo ‘version two’ >> test
         $ git commit -m ‘C2’



         topic




         C2
master




 C1
$ echo ‘version three’ >> test
         $ git commit -m ‘C3’

           topic




           C3




           C2
master




 C1
$ git checkout master
         $ echo ‘version four’ >> test
         $ git commit -m ‘C4’

           topic




           C3
master




 C4        C2




 C1
$ echo ‘version five’ >> test
         $ git commit -m ‘C5’


master     topic




 C5        C3




 C4        C2




 C1
master   topic




                 $ git diff topic
 C5      C3




 C4      C2




 C1
master      topic



         what does topic have
                   $ git diff   topic
 C5         C3
          that I don’t have?
 C4         C2




 C1
master       topic



         what would happen if I
                   $ git diff topic
 C5          C3
           merged in topic?
 C4          C2




 C1
master      topic



         how do I make topic
                    $ git diff   topic
 C5         C3
           look like HEAD?
 C4         C2




 C1
$ git diff topic
                 diff --git a/test b/test
master   topic
                 index 304313d..bd8c6c9 100644
                 --- a/test
                 +++ b/test
 C5      C3      @@ -1,3 +1,3 @@
                  version one
                 -version two
                 -version three
 C4      C2      +version four
                 +version five


 C1
$ git diff topic
                 diff --git a/test b/test
master   topic
                 index 304313d..bd8c6c9 100644
                 --- a/test
                 +++ b/test
 C5      C3      @@ -1,3 +1,3 @@
                  version one
                 -version two
                 -version three
 C4      C2      +version four
                 +version five


 C1
$ git diff HEAD topic
                 diff --git a/test b/test
master   topic
                 index bd8c6c9..304313d 100644
                 --- a/test
                 +++ b/test
 C5      C3      @@ -1,3 +1,3 @@
                  version one
                 -version four
                 -version five
 C4      C2      +version two
                 +version three


 C1
$ git diff HEAD topic
                 diff --git a/test b/test
master   topic
                 index bd8c6c9..304313d 100644
                 --- a/test
                 +++ b/test
 C5      C3      @@ -1,3 +1,3 @@
                  version one
                 -version four
                 -version five
 C4      C2      +version two
                 +version three


 C1
git diff HEAD   topic
git diff HEAD...topic
git diff HEAD...topic
$ git diff HEAD   topic

master   topic




 C5      C3




 C4      C2




 C1
$ git diff HEAD   topic

master   topic




 C5      C3




 C4      C2




 C1
$ git diff HEAD...topic

master   topic




 C5      C3




 C4      C2




 C1
$ git diff HEAD...topic
                   diff --git a/test b/test
master   topic     index 9bc69cf..304313d 100644
                   --- a/test
                   +++ b/test
                   @@ -1 +1,3 @@
 C5      C3
                    version one
                   +version two
                   +version three
 C4      C2




 C1
$ git diff HEAD...topic
                       diff --git a/test b/test
master       topic     index 9bc69cf..304313d 100644
                       --- a/test
         what would happen if I
                       +++ b/test
                       @@ -1 +1,3 @@
 C5          C3
           merged in topic?
                        version one
                       +version two
                       +version three
 C4          C2




 C1
Data Munging
Rewriting History
Modifying the last commit
git commit --amend
Rebasing
master   topic




 C5      C3




 C4      C2




 C1
topic




         C6
master




 C5      C3




 C4      C2




 C1

                 git merge master
master   topic




 C5      C3




 C4      C2




 C1


                 git rebase master
master   topic




 C5      C3




 C4      C2




 C1


                 git rebase master
master   topic




 C5      C3




 C4      C2




 C1


                 git rebase master
master   topic




 C5      C3




 C4      C2




 C1


                 git rebase master
master   topic




                 git diff c2 c3 > 2-3.patch
 C5      C3




 C4      C2




 C1


                    git rebase master
master   topic




                 git diff c2 c3 > 2-3.patch
 C5      C3

                 diff --git a/test b/test
                 index 2eadcec..bd8c6c9 100644
                 --- a/test
 C4      C2
                 +++ b/test
                 @@ -1,2 +1,3 @@
                  version one
                  version four
 C1              +version five


                      git rebase master
master   topic




 C5      C3




 C4      C2




 C1

                 2-3.patch
master      topic




 C5         C3




 C4         C2




         git diff c1 c2 > 1-2.patch
 C1

                                      2-3.patch
master      topic




 C5         C3




 C4         C2




         git diff c1 c2 > 1-2.patch
                          1-2.patch
 C1

                                      2-3.patch
master   topic




 C5      C3




 C4      C2




                 1-2.patch
 C1

                 2-3.patch
git rebase master


master   topic




 C5      C3




 C4      C2




                           1-2.patch
 C1

                           2-3.patch
git rebase master


1-2.patch
  master    topic




   C5       C3




   C4       C2




   C1

                              2-3.patch
git rebase master
         topic




master
         C2'




 C5      C3




 C4      C2




 C1

                           2-3.patch
git rebase master
         2-3.patch
            topic




master
            C2'




 C5         C3




 C4         C2




 C1
topic
                 git rebase master
         C3'



master
         C2'




 C5      C3




 C4      C2




 C1
topic




         C3'



master
         C2'

                 git rebase master
 C5      C3




 C4      C2




 C1
topic




         C3'



master
         C2'

                 git rebase master
 C5      C3




 C4      C2




 C1
topic




         C3'




         C2'

                 git rebase master
         C5
master




         C4




         C1
Fun with Rebasing
rebase --onto
Transplanting Topic
    Branches
master




C1    C2
master




C1    C2




                 C3




              server
master




C1    C2




                 C3




              server



                       C8    C9



                            client
master




C1    C2




              C3   C4   C10



                        server




                   C8    C9



                        client
master




C1   C2   C5    C6




          C3    C4      C10



                        server




                C8       C9



                        client
move your ‘client’
branch work to your
  ‘master’ branch
master




C1   C2   C5    C6




          C3    C4      C10



                        server




                C8       C9



                        client
master




C1   C2   C5    C6




          C3    C4      C10



                        server




                C8       C9



                        client
master




  C1    C2     C5    C6




               C3    C4      C10



                             server




                     C8       C9



                             client
git rebase master
master




  C1    C2     C5    C6




               C3    C4      C10



                             server




                     C8       C9



                             client
git rebase master
master




  C1    C2     C5    C6




               C3    C4      C10



                             server




                     C8       C9



                             client
git rebase master
master




  C1    C2     C5    C6




               C3    C4      C10



                             server




                     C8       C9



                             client
git rebase master
master




  C1    C2     C5    C6




               C3    C4      C10



                             server




                     C8       C9



                             client
git rebase server
master




  C1    C2     C5    C6




               C3    C4      C10



                             server




                     C8       C9



                             client
git rebase server
master




  C1    C2     C5    C6




               C3    C4      C10



                             server




                     C8       C9



                             client
git rebase server
master




  C1    C2     C5    C6




               C3    C4      C10



                             server




                     C8       C9



                             client
git rebase server
master




     C1    C2    C5     C6




                 C3     C4      C10



                                server




                        C8       C9



                                client


git rebase --onto master server
master




     C1    C2    C5     C6




                 C3     C4      C10



                                server




                        C8       C9



                                client


git rebase --onto master server
master




     C1    C2    C5     C6




                 C3     C4      C10



                                server




                        C8       C9



                                client


git rebase --onto master server
master




     C1    C2    C5     C6




                 C3     C4      C10



                                server




                        C8       C9



                                client


git rebase --onto master server
master             client
               master




C1        C5    C6       C8'       C9'
C1   C2         C6       C8        C9




          C3    C4      C10
                C4      C10



                        server
                         server




                C8       C9
                C8       C9



                        client
master            client




C1   C2   C5    C6       C8'      C9'




          C3    C4      C10



                        server




                C8       C9
master            client




    C1    C2     C5    C6       C8'      C9'




                 C3    C4      C10



                               server




                       C8       C9



git checkout server
git rebase master
master            client




    C1    C2     C5    C6       C8'      C9'




                 C3    C4      C10



                               server




                       C8       C9



git checkout server
git rebase client
master            client




    C1    C2     C5    C6       C8'      C9'




                 C3    C4      C10



                               server




                       C8       C9



git checkout server
git rebase client
master            client
                                         client




    C1    C2     C5     C6       C8'      C9'
                        C6




                 C3'    C4'     C10'
                 C3     C4      C10



                                server




                        C8       C9



git checkout server
git rebase client
client
                               client               server
                master




                                        C3'         C10'
 C1
 C1   C2
      C2   C5
           C5    C6
                 C6      C8'
                         C8'   C9'
                               C9'      C3'   C4'




git checkout server
git rebase client
client               server
                 master




 C1   C2    C5    C6      C8'   C9'      C3'   C4'   C10'




git checkout server
git rebase client
transplant some of a
    topic branch
master




C0   C1    C2




           C3      C4   C5




                        topic
master




C0   C1    C2




           C3      C4   C5




                        topic
master




      C0      C1     C2




                     C3      C4   C5




                                  topic




git branch newtopic C3
master




      C0      C1     C2




                     C3       C4   C5




                   newtopic        topic




git branch newtopic C3
master




      C0      C1     C2




                     C3       C4    C5




                   newtopic         topic




git branch newtopic C3
git rebase --onto master newtopic
master          topic




                              C4'   C5'
      C0      C1     C2




                     C3       C4    C5




                   newtopic




git branch newtopic C3
git rebase --onto master newtopic
Fixing a commit
  several back
git rebase -i
git rebase --interactive
default



 C4



 C3



 C2



 C1



 C0
default



 C4



 C3



 C2



 C1



 C0
default



             C4



             C3



default~2    C2



             C1



             C0
default



             C4



             C3



default~2    C2



             C1



             C0
git rebase -i default~2^
git rebase -i default~2^
git rebase -i default~2^
pick 969c877 git apply --directory broken for new files
pick b75271d git diff <tree>{3,}: do not reverse order of args
pick 72d404d test-lib: fix broken printf

# Rebase f285a2d..5c283eb onto f285a2d
#
# Commands:
# p, pick = use commit
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#
~
~
~
~
~
quot;~/projects/git/.git/rebase-merge/git-rebase-todoquot; 14L, 472C
C2
     pick 969c877 git apply --directory broken for new files
     pick b75271d git diff <tree>{3,}: do not reverse order of args
C3

     pick 72d404d test-lib: fix broken printf
C4




     # Rebase f285a2d..5c283eb onto f285a2d
     #
     # Commands:
     # p, pick = use commit
     # e, edit = use commit, but stop for amending
     # s, squash = use commit, but meld into previous commit
     #
     # If you remove a line here THAT COMMIT WILL BE LOST.
     # However, if you remove everything, the rebase will be aborted.
     #
     ~
     ~
     ~
     ~
     ~
     quot;~/projects/git/.git/rebase-merge/git-rebase-todoquot; 14L, 472C
pick 969c877 git apply --directory broken for new files
pick b75271d git diff <tree>{3,}: do not reverse order of args
pick 72d404d test-lib: fix broken printf

# Rebase f285a2d..5c283eb onto f285a2d
#
# Commands:
# p, pick = use commit
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#
~
~
~
~
~
quot;~/projects/git/.git/rebase-merge/git-rebase-todoquot; 14L, 472C
pick 969c877 git apply --directory broken for new files
pick b75271d git diff <tree>{3,}: do not reverse order of args
pick 72d404d test-lib: fix broken printf

# Rebase f285a2d..5c283eb onto f285a2d
#
# Commands:
# p, pick = use commit
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#
~
~
~
~
~
quot;~/projects/git/.git/rebase-merge/git-rebase-todoquot; 14L, 472C
pick 969c877 git apply --directory broken for new files
pick b75271d git diff <tree>{3,}: do not reverse order of args
pick 72d404d test-lib: fix broken printf

# Rebase f285a2d..5c283eb onto f285a2d
#
# Commands:
# p, pick = use commit
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#
~
~
~
~
~
quot;~/projects/git/.git/rebase-merge/git-rebase-todoquot; 14L, 472C
pick 969c877 git apply --directory broken for new files
pick b75271d git diff <tree>{3,}: do not reverse order of args
pick 72d404d test-lib: fix broken printf

# Rebase f285a2d..5c283eb onto f285a2d
#
# Commands:
# p, pick = use commit
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#
~
~
~
~
~
quot;~/projects/git/.git/rebase-merge/git-rebase-todoquot; 14L, 472C
pick 969c877 git apply --directory broken for new files
pick b75271d git diff <tree>{3,}: do not reverse order of args
pick 72d404d test-lib: fix broken printf

# Rebase f285a2d..5c283eb onto f285a2d
#
# Commands:
# p, pick = use commit
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#
~
~
~
~
~
quot;~/projects/git/.git/rebase-merge/git-rebase-todoquot; 14L, 472C
edit 969c877 git apply --directory broken for new files
pick b75271d git diff <tree>{3,}: do not reverse order of args
pick 72d404d test-lib: fix broken printf

# Rebase f285a2d..5c283eb onto f285a2d
#
# Commands:
# p, pick = use commit
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#
~
~
~
~
~
quot;~/projects/git/.git/rebase-merge/git-rebase-todoquot; 14L, 472C
$ git rebase -i default~2^
Stopped at 969c877... git apply --directory broken for new files
You can amend the commit now, with

        git commit --amend

Once you are satisfied with your changes, run

        git rebase --continue

$_
$ git rebase -i default~2^
Stopped at 969c877... git apply --directory broken for new files
You can amend the commit now, with

        git commit --amend

Once you are satisfied with your changes, run

        git rebase --continue

$_



                    edit files
                     git add
             git commit --amend
             git rebase --continue
$ git rebase -i default~2^
Stopped at 969c877... git apply --directory broken for new files
You can amend the commit now, with

        git commit --amend

Once you are satisfied with your changes, run

        git rebase --continue

$_



                    edit files
                     git add
             git commit --amend
             git rebase --continue
$ git rebase -i default~2^
Stopped at 969c877... git apply --directory broken for new files
You can amend the commit now, with

        git commit --amend

Once you are satisfied with your changes, run

        git rebase --continue

$_



                    edit files
                     git add
             git commit --amend
             git rebase --continue
$ git rebase -i default~2^
Stopped at 969c877... git apply --directory broken for new files
You can amend the commit now, with

        git commit --amend

Once you are satisfied with your changes, run

        git rebase --continue

$_



                    edit files
                     git add
             git commit --amend
             git rebase --continue
default



C4    C4'



C3    C3'



C2    C2'



C1



C0
default



C4    C4'



C3    C3'



C2    C2'



C1



C0
default



C4    C4'



C3    C3'



C2    C2'



C1



C0
Squashing commits
     together
pick 969c877 git apply --directory broken for new files
pick b75271d git diff <tree>{3,}: do not reverse order of args
pick 72d404d test-lib: fix broken printf

# Rebase f285a2d..5c283eb onto f285a2d
#
# Commands:
# p, pick = use commit
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#
~
~
~
~
~
quot;~/projects/git/.git/rebase-merge/git-rebase-todoquot; 14L, 472C
pick 969c877 git apply --directory broken for new files
squash b75271d git diff <tree>{3,}: do not reverse order of args
squash 72d404d test-lib: fix broken printf

# Rebase f285a2d..5c283eb onto f285a2d
#
# Commands:
# p, pick = use commit
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#
~
~
~
~
~
quot;~/projects/git/.git/rebase-merge/git-rebase-todoquot; 14L, 472C
# This is a combination of 3 commits.
# The first commit's message is:
git apply --directory broken for new files

# This is the 2nd commit message:

git diff <tree>{3,}: do not reverse order of args

# This is the 3rd commit message:

test-lib: fix broken printf

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# Author:    Jeff King <peff@peff.net>
#
# Not currently on any branch.
# Changes to be committed:
#   (use quot;git reset HEAD <file>...quot; to unstage)
#
# modified:   builtin-apply.c
# modified:   builtin-diff.c
# modified:   t/t4013-diff-various.sh
# new file:   t/t4013/diff.diff_master_master^_side
# modified:   t/t4128-apply-root.sh
# modified:   t/test-lib.sh
#
~
~
quot;.git/COMMIT_EDITMSGquot; 39L, 1454C
# This is a combination of 3 commits.
# The first commit's message is:
git apply --directory broken for new files

# This is the 2nd commit message:

git diff <tree>{3,}: do not reverse order of args

# This is the 3rd commit message:

test-lib: fix broken printf

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# Author:    Jeff King <peff@peff.net>
#
# Not currently on any branch.
# Changes to be committed:
#   (use quot;git reset HEAD <file>...quot; to unstage)
#
# modified:   builtin-apply.c
# modified:   builtin-diff.c
# modified:   t/t4013-diff-various.sh
# new file:   t/t4013/diff.diff_master_master^_side
# modified:   t/t4128-apply-root.sh
# modified:   t/test-lib.sh
#
~
~
quot;.git/COMMIT_EDITMSGquot; 39L, 1454C
# This is a combination of 3 commits.
# The first commit's message is:
git apply --directory broken for new files

# This is the 2nd commit message:

git diff <tree>{3,}: do not reverse order of args

# This is the 3rd commit message:

test-lib: fix broken printf

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# Author:    Jeff King <peff@peff.net>
#
# Not currently on any branch.
# Changes to be committed:
#   (use quot;git reset HEAD <file>...quot; to unstage)
#
# modified:   builtin-apply.c
# modified:   builtin-diff.c
# modified:   t/t4013-diff-various.sh
# new file:   t/t4013/diff.diff_master_master^_side
# modified:   t/t4128-apply-root.sh
# modified:   t/test-lib.sh
#
~
~
quot;.git/COMMIT_EDITMSGquot; 39L, 1454C
# This is a combination of 3 commits.
# The first commit's message is:
git apply --directory broken for new files

# This is the 2nd commit message:

git diff <tree>{3,}: do not reverse order of args

# This is the 3rd commit message:

test-lib: fix broken printf

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# Author:    Jeff King <peff@peff.net>
#
# Not currently on any branch.
# Changes to be committed:
#   (use quot;git reset HEAD <file>...quot; to unstage)
#
# modified:   builtin-apply.c
# modified:   builtin-diff.c
# modified:   t/t4013-diff-various.sh
# new file:   t/t4013/diff.diff_master_master^_side
# modified:   t/t4128-apply-root.sh
# modified:   t/test-lib.sh
#
~
~
quot;.git/COMMIT_EDITMSGquot; 39L, 1454C
C4



C3
     default



C2    C5



C1



C0
The Perils
scott   jessica




default



 C1



 C0
scott                   jessica




                                      default



                                        C4



                                        C3



                                        C2
default           scott/default



                      C1
 C1




 C0                   C0
scott                   jessica




default           scott/default       default


                        C7
 C7                                     C4



                        C6
 C6                                     C3



                        C5
 C5                                     C2



                        C1
 C1




 C0                     C0
scott                   jessica




                                      default



                                        C8
                  scott/default
default


                      C7
 C7                                     C4



                      C6
 C6                                     C3



                      C5
 C5                                     C2



                      C1
 C1




 C0                   C0
scott                        jessica




                                      default



                                        C8
                  scott/default
        default


                      C7
C7       C7'                            C4



                      C6
C6       C6'                            C3



                      C5
C5       C5'                            C2



                      C1
C1




C0                    C0
scott                        jessica




                                            default



                                             C8
                  scott/default
        default


                     C7'           C7
C7       C7'                                 C4



                     C6'           C6
C6       C6'                                 C3



                     C5'           C5
C5       C5'                                 C2



                                   C1
C1




C0                                 C0
scott                        jessica



                                            default



                                             C9



                                             C8
                  scott/default
        default


                     C7'           C7
C7       C7'                                 C4



                     C6'           C6
C6       C6'                                 C3



                     C5'           C5
C5       C5'                                 C2



                                   C1
C1




C0                                 C0
Filter Branch
History Revision on Steroids
remove all instances of a
 file from every commit
git filter-branch
--tree-filter 'rm -f filename'
              HEAD
change your email
  in all commits
git filter-branch --env-filter
quot;export GIT_AUTHOR_EMAIL=you@email.comquot;
                  HEAD
git filter-branch --env-filter
quot;export GIT_AUTHOR_EMAIL=you@email.comquot;
           origin/master..HEAD
Subtree Merging
Alternative to
 Submodules
$ ls
README	 	 rack_app.rb
$ git remote add rack_remote git@github.com:schacon/rack.git
$ git fetch rack_remote
warning: no common commits
remote: Counting objects: 3184, done.
remote: Compressing objects: 100% (1465/1465), done.
remote: Total 3184 (delta 1952), reused 2770 (delta 1675)
Receiving objects: 100% (3184/3184), 677.42 KiB | 4 KiB/s, do
Resolving deltas: 100% (1952/1952), done.
From git@github.com:schacon/rack
 * [new branch]      master      -> rack_remote/master
$ git checkout -b rack_branch rack_remote/master
Branch rack_branch set up to track remote branch refs/remotes
Switched to a new branch quot;rack_branchquot;
$ ls
AUTHORS	 	 KNOWN-ISSUES	 Rakefile	 contrib	 lib
                                          	
COPYING	 	 README	 	     bin	 	    example	 test
master



 C3



 C2



 C1



 C0
$ ls
README	 	 rack_app.rb
$ git remote add rack_remote git@github.com:schacon/rack.git
$ git fetch rack_remote
warning: no common commits
remote: Counting objects: 3184, done.
remote: Compressing objects: 100% (1465/1465), done.
remote: Total 3184 (delta 1952), reused 2770 (delta 1675)
Receiving objects: 100% (3184/3184), 677.42 KiB | 4 KiB/s, do
Resolving deltas: 100% (1952/1952), done.
From git@github.com:schacon/rack
 * [new branch]      master      -> rack_remote/master
$ git checkout -b rack_branch rack_remote/master
Branch rack_branch set up to track remote branch refs/remotes
Switched to a new branch quot;rack_branchquot;
$ ls
AUTHORS	 	 KNOWN-ISSUES	 Rakefile	 contrib	 lib
                                          	
COPYING	 	 README	 	     bin	 	    example	 test
$ ls
README	 	 rack_app.rb
$ git remote add rack_remote git@github.com:schacon/rack.git
$ git fetch rack_remote
warning: no common commits
remote: Counting objects: 3184, done.
remote: Compressing objects: 100% (1465/1465), done.
remote: Total 3184 (delta 1952), reused 2770 (delta 1675)
Receiving objects: 100% (3184/3184), 677.42 KiB | 4 KiB/s, do
Resolving deltas: 100% (1952/1952), done.
From git@github.com:schacon/rack
 * [new branch]      master      -> rack_remote/master
$ git checkout -b rack_branch rack_remote/master
Branch rack_branch set up to track remote branch refs/remotes
Switched to a new branch quot;rack_branchquot;
$ ls
AUTHORS	 	 KNOWN-ISSUES	 Rakefile	 contrib	 lib
                                          	
COPYING	 	 README	 	     bin	 	    example	 test
$ ls
README	 	 rack_app.rb
$ git remote add rack_remote git@github.com:schacon/rack.git
$ git fetch rack_remote
warning: no common commits
remote: Counting objects: 3184, done.
remote: Compressing objects: 100% (1465/1465), done.
remote: Total 3184 (delta 1952), reused 2770 (delta 1675)
Receiving objects: 100% (3184/3184), 677.42 KiB | 4 KiB/s, do
Resolving deltas: 100% (1952/1952), done.
From git@github.com:schacon/rack
 * [new branch]      master      -> rack_remote/master
$ git checkout -b rack_branch rack_remote/master
Branch rack_branch set up to track remote branch refs/remotes
Switched to a new branch quot;rack_branchquot;
$ ls
AUTHORS	 	 KNOWN-ISSUES	 Rakefile	 contrib	 lib
                                          	
COPYING	 	 README	 	     bin	 	    example	 test
$ ls
README	 	 rack_app.rb
$ git remote add rack_remote git@github.com:schacon/rack.git
$ git fetch rack_remote
warning: no common commits
remote: Counting objects: 3184, done.
remote: Compressing objects: 100% (1465/1465), done.
remote: Total 3184 (delta 1952), reused 2770 (delta 1675)
Receiving objects: 100% (3184/3184), 677.42 KiB | 4 KiB/s, do
Resolving deltas: 100% (1952/1952), done.
From git@github.com:schacon/rack
 * [new branch]      master      -> rack_remote/master
$ git checkout -b rack_branch rack_remote/master
Branch rack_branch set up to track remote branch refs/remotes
Switched to a new branch quot;rack_branchquot;
$ ls
AUTHORS	 	 KNOWN-ISSUES	 Rakefile	 contrib	 lib
                                          	
COPYING	 	 README	 	     bin	 	    example	 test
$ ls
README	 	 rack_app.rb
$ git remote add rack_remote git@github.com:schacon/rack.git
$ git fetch rack_remote
warning: no common commits
remote: Counting objects: 3184, done.
remote: Compressing objects: 100% (1465/1465), done.
remote: Total 3184 (delta 1952), reused 2770 (delta 1675)
Receiving objects: 100% (3184/3184), 677.42 KiB | 4 KiB/s, do
Resolving deltas: 100% (1952/1952), done.
From git@github.com:schacon/rack
 * [new branch]      master      -> rack_remote/master
$ git checkout -b rack_branch rack_remote/master
Branch rack_branch set up to track remote branch refs/remotes
Switched to a new branch quot;rack_branchquot;
$ ls
AUTHORS	 	 KNOWN-ISSUES	 Rakefile	 contrib	 lib
                                          	
COPYING	 	 README	 	     bin	 	    example	 test
$ ls
README	 	 rack_app.rb
$ git remote add rack_remote git@github.com:schacon/rack.git
$ git fetch rack_remote
warning: no common commits
remote: Counting objects: 3184, done.
remote: Compressing objects: 100% (1465/1465), done.
remote: Total 3184 (delta 1952), reused 2770 (delta 1675)
Receiving objects: 100% (3184/3184), 677.42 KiB | 4 KiB/s, do
Resolving deltas: 100% (1952/1952), done.
From git@github.com:schacon/rack
 * [new branch]      master      -> rack_remote/master
$ git checkout -b rack_branch rack_remote/master
Branch rack_branch set up to track remote branch refs/remotes
Switched to a new branch quot;rack_branchquot;
$ ls
AUTHORS	 	 KNOWN-ISSUES	 Rakefile	 contrib	 lib
                                          	
COPYING	 	 README	 	     bin	 	    example	 test
$ ls
README	 	 rack_app.rb
$ git remote add rack_remote git@github.com:schacon/rack.git
$ git fetch rack_remote
warning: no common commits
remote: Counting objects: 3184, done.
remote: Compressing objects: 100% (1465/1465), done.
remote: Total 3184 (delta 1952), reused 2770 (delta 1675)
Receiving objects: 100% (3184/3184), 677.42 KiB | 4 KiB/s, do
Resolving deltas: 100% (1952/1952), done.
From git@github.com:schacon/rack
 * [new branch]      master      -> rack_remote/master
$ git checkout -b rack_branch rack_remote/master
Branch rack_branch set up to track remote branch refs/remotes
Switched to a new branch quot;rack_branchquot;
$ ls
AUTHORS	 	 KNOWN-ISSUES	 Rakefile	 contrib	 lib
                                          	
COPYING	 	 README	 	     bin	 	    example	 test
$ ls
README	 	 rack_app.rb
$ git remote add rack_remote git@github.com:schacon/rack.git
$ git fetch rack_remote
warning: no common commits
remote: Counting objects: 3184, done.
remote: Compressing objects: 100% (1465/1465), done.
remote: Total 3184 (delta 1952), reused 2770 (delta 1675)
Receiving objects: 100% (3184/3184), 677.42 KiB | 4 KiB/s, do
Resolving deltas: 100% (1952/1952), done.
From git@github.com:schacon/rack
 * [new branch]      master      -> rack_remote/master
$ git checkout -b rack_branch rack_remote/master
Branch rack_branch set up to track remote branch refs/remotes
Switched to a new branch quot;rack_branchquot;
$ ls
AUTHORS	 	 KNOWN-ISSUES	 Rakefile	 contrib	 lib
                                          	
COPYING	 	 README	 	     bin	 	    example	 test
master




 C3      rack_branch




             C6        rack_remote/master
 C2



             C5
 C1



 C0          C4
$ git checkout master
$ ls
README	 rack_app.rb
      	
$ git checkout rack_branch
$ ls
AUTHORS	 	 KNOWN-ISSUES	Rakefile	 contrib	 lib
                                          	
COPYING	 	 README	
                 	      bin	  	 example	 test
$ git checkout master
$ ls
README	 rack_app.rb
      	
$ git checkout rack_branch
$ ls
AUTHORS	 	 KNOWN-ISSUES	Rakefile	 contrib	 lib
                                          	
COPYING	 	 README	
                 	      bin	  	 example	 test
$ git checkout master
$ ls
README	 rack_app.rb
      	
$ git checkout rack_branch
$ ls
AUTHORS	 	 KNOWN-ISSUES	Rakefile	 contrib	 lib
                                          	
COPYING	 	 README	
                 	      bin	  	 example	 test
$ git checkout master
$ ls
README	 rack_app.rb
      	
$ git checkout rack_branch
$ ls
AUTHORS	 	 KNOWN-ISSUES	Rakefile	 contrib	 lib
                                          	
COPYING	 	 README	
                 	      bin	  	 example	 test
checkout ‘rack’
into my project
$ git read-tree --prefix=rack/ -u rack_branch
$ ls
README	 rack	 rack_app.rb
      	      	
$ ls rack
AUTHORS	 	 KNOWN-ISSUES	Rakefile	contrib	 	 lib
COPYING	 	 README	
                 	      bin	 	  example	 	 test
$ git add rack
$ git commit -m 'added rack code'
[master 0839fd8] added rack code
 108 files changed, 10334 insertions(+), 0 dele
 create mode 100644 rack/AUTHORS
 create mode 100644 rack/COPYING
 ...
 create mode 100644 rack/test/testrequest.rb
$ git read-tree --prefix=rack/ -u rack_branch
$ ls
README	 rack	 rack_app.rb
      	      	
$ ls rack
AUTHORS	 	 KNOWN-ISSUES	Rakefile	contrib	 	 lib
COPYING	 	 README	
                 	      bin	 	  example	 	 test
$ git add rack
$ git commit -m 'added rack code'
[master 0839fd8] added rack code
 108 files changed, 10334 insertions(+), 0 dele
 create mode 100644 rack/AUTHORS
 create mode 100644 rack/COPYING
 ...
 create mode 100644 rack/test/testrequest.rb
$ git read-tree --prefix=rack/ -u rack_branch
$ ls
README	 rack	 rack_app.rb
      	      	
$ ls rack
AUTHORS	 	 KNOWN-ISSUES	Rakefile	contrib	 	 lib
COPYING	 	 README	
                 	      bin	 	  example	 	 test
$ git add rack
$ git commit -m 'added rack code'
[master 0839fd8] added rack code
 108 files changed, 10334 insertions(+), 0 dele
 create mode 100644 rack/AUTHORS
 create mode 100644 rack/COPYING
 ...
 create mode 100644 rack/test/testrequest.rb
$ git read-tree --prefix=rack/ -u rack_branch
$ ls
README	 rack	 rack_app.rb
      	      	
$ ls rack
AUTHORS	 	 KNOWN-ISSUES	Rakefile	contrib	 	 lib
COPYING	 	 README	
                 	      bin	 	  example	 	 test
$ git add rack
$ git commit -m 'added rack code'
[master 0839fd8] added rack code
 108 files changed, 10334 insertions(+), 0 dele
 create mode 100644 rack/AUTHORS
 create mode 100644 rack/COPYING
 ...
 create mode 100644 rack/test/testrequest.rb
$ git read-tree --prefix=rack/ -u rack_branch
$ ls
README	 rack	 rack_app.rb
      	      	
$ ls rack
AUTHORS	 	 KNOWN-ISSUES	Rakefile	contrib	 	 lib
COPYING	 	 README	
                 	      bin	 	  example	 	 test
$ git add rack
$ git commit -m 'added rack code'
[master 0839fd8] added rack code
 108 files changed, 10334 insertions(+), 0 dele
 create mode 100644 rack/AUTHORS
 create mode 100644 rack/COPYING
 ...
 create mode 100644 rack/test/testrequest.rb
$ git read-tree --prefix=rack/ -u rack_branch
$ ls
README	 rack	 rack_app.rb
      	      	
$ ls rack
AUTHORS	 	 KNOWN-ISSUES	Rakefile	contrib	 	 lib
COPYING	 	 README	
                 	      bin	 	  example	 	 test
$ git add rack
$ git commit -m 'added rack code'
[master 0839fd8] added rack code
 108 files changed, 10334 insertions(+), 0 dele
 create mode 100644 rack/AUTHORS
 create mode 100644 rack/COPYING
 ...
 create mode 100644 rack/test/testrequest.rb
edit a file in rack
$ vim rack/lib/rack.rb
$ git commit -am 'added awesome to rack'
[master b1b77ee] added awesome to rack
  1 files changed, 1 insertions(+), 0 deletions(-)
$ git checkout rack_branch
$ git merge --squash -s subtree --no-commit master
Squash commit -- not updating HEAD
Automatic merge went well; stopped before committin
$ git status
# On branch rack_branch
# Changes to be committed:
#    (use quot;git reset HEAD <file>...quot; to unstage)
#
#	 modified:   lib/rack.rb
#
$ vim rack/lib/rack.rb
$ git commit -am 'added awesome to rack'
[master b1b77ee] added awesome to rack
  1 files changed, 1 insertions(+), 0 deletions(-)
$ git checkout rack_branch
$ git merge --squash -s subtree --no-commit master
Squash commit -- not updating HEAD
Automatic merge went well; stopped before committin
$ git status
# On branch rack_branch
# Changes to be committed:
#    (use quot;git reset HEAD <file>...quot; to unstage)
#
#	 modified:   lib/rack.rb
#
$ vim rack/lib/rack.rb
$ git commit -am 'added awesome to rack'
[master b1b77ee] added awesome to rack
  1 files changed, 1 insertions(+), 0 deletions(-)
$ git checkout rack_branch
$ git merge --squash -s subtree --no-commit master
Squash commit -- not updating HEAD
Automatic merge went well; stopped before committin
$ git status
# On branch rack_branch
# Changes to be committed:
#    (use quot;git reset HEAD <file>...quot; to unstage)
#
#	 modified:   lib/rack.rb
#
submit the change
   back to rack
$ vim rack/lib/rack.rb
$ git commit -am 'added awesome to rack'
[master b1b77ee] added awesome to rack
  1 files changed, 1 insertions(+), 0 deletions(-)
$ git checkout rack_branch
$ git merge --squash -s subtree --no-commit master
Squash commit -- not updating HEAD
Automatic merge went well; stopped before committin
$ git status
# On branch rack_branch
# Changes to be committed:
#    (use quot;git reset HEAD <file>...quot; to unstage)
#
#	 modified:   lib/rack.rb
#
git merge -s subtree
$ vim rack/lib/rack.rb
$ git commit -am 'added awesome to rack'
[master b1b77ee] added awesome to rack
  1 files changed, 1 insertions(+), 0 deletions(-)
$ git checkout rack_branch
$ git merge -s subtree --no-commit --squash master
Squash commit -- not updating HEAD
Automatic merge went well; stopped before committin
$ git status
# On branch rack_branch
# Changes to be committed:
#    (use quot;git reset HEAD <file>...quot; to unstage)
#
#	 modified:   lib/rack.rb
#
$ vim rack/lib/rack.rb
$ git commit -am 'added awesome to rack'
[master b1b77ee] added awesome to rack
  1 files changed, 1 insertions(+), 0 deletions(-)
$ git checkout rack_branch
$ git merge -s subtree --no-commit --squash master
Squash commit -- not updating HEAD
Automatic merge went well; stopped before committin
$ git status
# On branch rack_branch
# Changes to be committed:
#    (use quot;git reset HEAD <file>...quot; to unstage)
#
#	 modified:   lib/rack.rb
#
$ vim rack/lib/rack.rb
$ git commit -am 'added awesome to rack'
[master b1b77ee] added awesome to rack
  1 files changed, 1 insertions(+), 0 deletions(-)
$ git checkout rack_branch
$ git merge -s subtree --no-commit --squash master
Squash commit -- not updating HEAD
Automatic merge went well; stopped before committin
$ git status
# On branch rack_branch
# Changes to be committed:
#    (use quot;git reset HEAD <file>...quot; to unstage)
#
#	 modified:   lib/rack.rb
#
$ vim rack/lib/rack.rb
$ git commit -am 'added awesome to rack'
[master b1b77ee] added awesome to rack
  1 files changed, 1 insertions(+), 0 deletions(-)
$ git checkout rack_branch
$ git merge -s subtree --no-commit --squash master
Squash commit -- not updating HEAD
Automatic merge went well; stopped before committin
$ git status
# On branch rack_branch
# Changes to be committed:
#    (use quot;git reset HEAD <file>...quot; to unstage)
#
#	 modified:   lib/rack.rb
#
$ vim rack/lib/rack.rb
$ git commit -am 'added awesome to rack'
[master b1b77ee] added awesome to rack
  1 files changed, 1 insertions(+), 0 deletions(-)
$ git checkout rack_branch
$ git merge -s subtree --no-commit --squash master
Squash commit -- not updating HEAD
Automatic merge went well; stopped before committin
$ git status
# On branch rack_branch
# Changes to be committed:
#    (use quot;git reset HEAD <file>...quot; to unstage)
#
#	 modified:   lib/rack.rb
#
$ vim rack/lib/rack.rb
$ git commit -am 'added awesome to rack'
[master b1b77ee] added awesome to rack
  1 files changed, 1 insertions(+), 0 deletions(-)
$ git checkout rack_branch
$ git merge -s subtree --no-commit --squash master
Squash commit -- not updating HEAD
Automatic merge went well; stopped before committin
$ git status
# On branch rack_branch
# Changes to be committed:
#    (use quot;git reset HEAD <file>...quot; to unstage)
#
#	 modified:   lib/rack.rb
#
$ vim rack/lib/rack.rb
$ git commit -am 'added awesome to rack'
[master b1b77ee] added awesome to rack
  1 files changed, 1 insertions(+), 0 deletions(-)
$ git checkout rack_branch
$ git merge -s subtree --no-commit --squash master
Squash commit -- not updating HEAD
Automatic merge went well; stopped before committin
$ git status
# On branch rack_branch
# Changes to be committed:
#    (use quot;git reset HEAD <file>...quot; to unstage)
#
#	 modified:   lib/rack.rb
#
$ vim rack/lib/rack.rb
$ git commit -am 'added awesome to rack'
[master b1b77ee] added awesome to rack
  1 files changed, 1 insertions(+), 0 deletions(-)
$ git checkout rack_branch
$ git merge -s subtree --no-commit --squash master
Squash commit -- not updating HEAD
Automatic merge went well; stopped before committin
$ git status
# On branch rack_branch
# Changes to be committed:
#    (use quot;git reset HEAD <file>...quot; to unstage)
#
#	 modified:   lib/rack.rb
#
$ vim rack/lib/rack.rb
$ git commit -am 'added awesome to rack'
[master b1b77ee] added awesome to rack
  1 files changed, 1 insertions(+), 0 deletions(-)
$ git checkout rack_branch
$ git merge -s subtree --no-commit --squash master
Squash commit -- not updating HEAD
Automatic merge went well; stopped before committin
$ git status
# On branch rack_branch
# Changes to be committed:
#    (use quot;git reset HEAD <file>...quot; to unstage)
#
#	 modified:   lib/rack.rb
#
git merge -s subtree --no-commit --squash master
git merge -s subtree --no-commit --squash master




                   really?
Tim Dysinger

            http://dysinger.net/2008/04/29/
replacing-braid-or-piston-for-git-with-40-lines-of-rake/
Tim Dysinger

            http://dysinger.net/2008/04/29/
replacing-braid-or-piston-for-git-with-40-lines-of-rake/


              http://tinyurl.com/braidgit
Patch Staging
git add -p
$ git status
# On branch master
# Changed but not updated:
#   (use quot;git add <file>...quot; to update what wi
#   (use quot;git checkout -- <file>...quot; to discar
#
#	modified:   ticgit.gemspec
#
no changes added to commit (use quot;git addquot; and/
$ git status
# On branch master
# Changed but not updated:
#   (use quot;git add <file>...quot; to update what wi
#   (use quot;git checkout -- <file>...quot; to discar
#
#	modified:   ticgit.gemspec
#
no changes added to commit (use quot;git addquot; and/
$ git add -p
diff --git a/ticgit.gemspec b/ticgit.gemspec
index 9c32bd4..a44667b 100644
--- a/ticgit.gemspec
+++ b/ticgit.gemspec
@@ -1,7 +1,7 @@
  Gem::Specification.new do |s|
      s.platform =    Gem::Platform::RUBY
      s.name      =   quot;ticgitquot;
-     s.version   =   quot;0.3.5quot;
+     s.version   =   quot;0.3.6quot;
      s.date      =   quot;2008-05-10quot;
      s.author    =   quot;Scott Chaconquot;
      s.email     =   quot;schacon@gmail.comquot;
Stage this hunk [y,n,a,d,/,j,J,g,e,?]? y
$ git add -p
diff --git a/ticgit.gemspec b/ticgit.gemspec
index 9c32bd4..a44667b 100644
--- a/ticgit.gemspec
+++ b/ticgit.gemspec
@@ -1,7 +1,7 @@
  Gem::Specification.new do |s|
      s.platform =    Gem::Platform::RUBY
      s.name      =   quot;ticgitquot;
-     s.version   =   quot;0.3.5quot;
+     s.version   =   quot;0.3.6quot;
      s.date      =   quot;2008-05-10quot;
      s.author    =   quot;Scott Chaconquot;
      s.email     =   quot;schacon@gmail.comquot;
Stage this hunk [y,n,a,d,/,j,J,g,e,?]? y
$ git add -p
diff --git a/ticgit.gemspec b/ticgit.gemspec
index 9c32bd4..a44667b 100644
--- a/ticgit.gemspec
+++ b/ticgit.gemspec
@@ -1,7 +1,7 @@
  Gem::Specification.new do |s|
      s.platform =    Gem::Platform::RUBY
      s.name      =   quot;ticgitquot;
-     s.version   =   quot;0.3.5quot;
+     s.version   =   quot;0.3.6quot;
      s.date      =   quot;2008-05-10quot;
      s.author    =   quot;Scott Chaconquot;
      s.email     =   quot;schacon@gmail.comquot;
Stage this hunk [y,n,a,d,/,j,J,g,e,?]?
$ git add -p
diff --git a/ticgit.gemspec b/ticgit.gemspec
index 9c32bd4..a44667b 100644
--- a/ticgit.gemspec
+++ b/ticgit.gemspec
@@ -1,7 +1,7 @@
  Gem::Specification.new do |s|
      s.platform =    Gem::Platform::RUBY
      s.name      =   quot;ticgitquot;
-     s.version   =   quot;0.3.5quot;
+     s.version   =   quot;0.3.6quot;
      s.date      =   quot;2008-05-10quot;
      s.author    =   quot;Scott Chaconquot;
      s.email     =   quot;schacon@gmail.comquot;
Stage this hunk [y,n,a,d,/,j,J,g,e,?]? y
@@ -9,9 +9,10 @@ Gem::Specification.new do |s|
     s.files     =   [quot;lib/ticgit/base.rbquot;, quot;lib/ticgit/
quot;lib/ticgit/comment.rbquot;, quot;lib/ticgit/ticket.rbquot;, quot;lib/
ticgit.rbquot;, quot;bin/tiquot;, quot;bin/ticgitwebquot;]

     s.bindir = 'bin'
-    s.executables << quot;tiquot;
-    s.executables << quot;ticgitwebquot;
+    s.executables = [quot;tiquot;, quot;ticgitwebquot;]
+    s.default_executable = %q{ti}
     s.homepage = quot;http://github/schacon/ticgitquot;

      s.require_paths = [quot;libquot;, quot;binquot;]
+     s.specification_version = 2 if
s.respond_to? :specification_version=
  end
Stage this hunk [y,n,a,d,/,K,g,s,e,?]?
@@ -9,9 +9,10 @@ Gem::Specification.new do |s|
     s.files     =   [quot;lib/ticgit/base.rbquot;, quot;lib/ticgit/
quot;lib/ticgit/comment.rbquot;, quot;lib/ticgit/ticket.rbquot;, quot;lib/
ticgit.rbquot;, quot;bin/tiquot;, quot;bin/ticgitwebquot;]

     s.bindir = 'bin'
-    s.executables << quot;tiquot;
-    s.executables << quot;ticgitwebquot;
+    s.executables = [quot;tiquot;, quot;ticgitwebquot;]
+    s.default_executable = %q{ti}
     s.homepage = quot;http://github/schacon/ticgitquot;

      s.require_paths = [quot;libquot;, quot;binquot;]
+     s.specification_version = 2 if
s.respond_to? :specification_version=
  end
Stage this hunk [y,n,a,d,/,K,g,s,e,?]?
@@ -9,9 +9,10 @@ Gem::Specification.new do |s|
     s.files     =   [quot;lib/ticgit/base.rbquot;, quot;lib/ticgit/
quot;lib/ticgit/comment.rbquot;, quot;lib/ticgit/ticket.rbquot;, quot;lib/
ticgit.rbquot;, quot;bin/tiquot;, quot;bin/ticgitwebquot;]

     s.bindir = 'bin'
-    s.executables << quot;tiquot;
-    s.executables << quot;ticgitwebquot;
+    s.executables = [quot;tiquot;, quot;ticgitwebquot;]
+    s.default_executable = %q{ti}
     s.homepage = quot;http://github/schacon/ticgitquot;

      s.require_paths = [quot;libquot;, quot;binquot;]
+     s.specification_version = 2 if
s.respond_to? :specification_version=
  end
Stage this hunk [y,n,a,d,/,K,g,s,e,?]? n
$ git status
# On branch master
# Changes to be committed:
#   (use quot;git reset HEAD <file>...quot; to unstage)
#
#	 modified:   ticgit.gemspec
#
# Changed but not updated:
#   (use quot;git add <file>...quot; to update what will be com
#   (use quot;git checkout -- <file>...quot; to discard changes
#
#	 modified:   ticgit.gemspec
#
$ git status
# On branch master
# Changes to be committed:
#   (use quot;git reset HEAD <file>...quot; to unstage)
#
#	 modified:   ticgit.gemspec
#
# Changed but not updated:
#   (use quot;git add <file>...quot; to update what will be com
#   (use quot;git checkout -- <file>...quot; to discard changes
#
#	 modified:   ticgit.gemspec
#
$ git status
# On branch master
# Changes to be committed:
#   (use quot;git reset HEAD <file>...quot; to unstage)
#
#	 modified:   ticgit.gemspec
#
# Changed but not updated:
#   (use quot;git add <file>...quot; to update what will be com
#   (use quot;git checkout -- <file>...quot; to discard changes
#
#	 modified:   ticgit.gemspec
#
$ git status
# On branch master
# Changes to be committed:
#   (use quot;git reset HEAD <file>...quot; to unstage)
#
#	 modified:   ticgit.gemspec
#
# Changed but not updated:
#   (use quot;git add <file>...quot; to update what will be com
#   (use quot;git checkout -- <file>...quot; to discard changes
#
#	 modified:   ticgit.gemspec
#
partially stage files
git add -p
Debugging
Annotation
git blame
git blame
ie: “what dumbass did this? oh, it was me...”
git blame daemon.c
979e32fa   (Randal L. Schwartz        2005-10-25   16:29:09   -0700    1)   #include   quot;cache.hquot;
85023577   (Junio C Hamano            2006-12-19   14:34:12   -0800    2)   #include   quot;pkt-line.hquot;
77cb17e9   (Michal Ostrowski          2006-01-10   21:12:17   -0500    3)   #include   quot;exec_cmd.hquot;
49ba83fb   (Jon Loeliger              2006-09-19   20:31:51   -0500    4)   #include   quot;interpolate.hquot;
f8ff0c06   (Petr Baudis               2005-09-22   11:25:28   +0200    5)
85023577   (Junio C Hamano            2006-12-19   14:34:12   -0800    6)   #include <syslog.h>
85023577   (Junio C Hamano            2006-12-19   14:34:12   -0800    7)
695dffe2   (Johannes Schindelin       2006-09-28   12:00:35   +0200    8)   #ifndef HOST_NAME_MAX
695dffe2   (Johannes Schindelin       2006-09-28   12:00:35   +0200    9)   #define HOST_NAME_MAX 256
695dffe2   (Johannes Schindelin       2006-09-28   12:00:35   +0200   10)   #endif
695dffe2   (Johannes Schindelin       2006-09-28   12:00:35   +0200   11)
415e7b87   (Patrick Welche            2007-10-18   18:17:39   +0100   12)   #ifndef NI_MAXSERV
415e7b87   (Patrick Welche            2007-10-18   18:17:39   +0100   13)   #define NI_MAXSERV 32
415e7b87   (Patrick Welche            2007-10-18   18:17:39   +0100   14)   #endif
415e7b87   (Patrick Welche            2007-10-18   18:17:39   +0100   15)
9048fe1c   (Petr Baudis               2005-09-24   16:13:01   +0200   16)   static int log_syslog;
f8ff0c06   (Petr Baudis               2005-09-22   11:25:28   +0200   17)   static int verbose;
1955fabf   (Mark Wooding              2006-02-03   20:27:04   +0000   18)   static int reuseaddr;
f8ff0c06   (Petr Baudis               2005-09-22   11:25:28   +0200   19)
960deccb   (H. Peter Anvin            2005-10-19   14:27:01   -0700   20)   static const char daemon_usage[] =
1b1dd23f   (Stephan Beyer             2008-07-13   15:36:15   +0200   21)   quot;git daemon [--verbose] [--syslog] [
3bd62c21   (Stephen R. van den Berg   2008-08-14   20:02:20   +0200   22)   quot;           [--timeout=n] [--init-ti
3bd62c21   (Stephen R. van den Berg   2008-08-14   20:02:20   +0200   23)   quot;           [--strict-paths] [--base
73a7a656   (Jens Axboe                2007-07-27   14:00:29   -0700   24)   quot;           [--user-path | --user-pa
49ba83fb   (Jon Loeliger              2006-09-19   20:31:51   -0500   25)   quot;           [--interpolated-path=pat
678dac6b   (Tilman Sauerbeck          2006-08-22   19:37:41   +0200   26)   quot;           [--reuseaddr] [--detach]
d9edcbd6   (Junio C Hamano            2006-09-07   01:40:04   -0700   27)   quot;           [--[enable|disable|allow
dd467629   (Jon Loeliger              2006-09-26   09:47:43   -0500   28)   quot;           [--inetd | [--listen=hos
dd467629   (Jon Loeliger              2006-09-26   09:47:43   -0500   29)   quot;                      [--user=user
dd467629   (Jon Loeliger              2006-09-26   09:47:43   -0500   30)   quot;           [directory...]quot;;
4ae95682   (H. Peter Anvin            2005-09-26   19:10:55   -0700   31)
4ae95682   (H. Peter Anvin            2005-09-26   19:10:55   -0700   32)   /* List of acceptable pathname prefi
96f1e58f   (David Rientjes            2006-08-15   10:23:48   -0700   33)   static char **ok_paths;
git blame daemon.c
979e32fa   (Randal L. Schwartz        2005-10-25   16:29:09   -0700    1)   #include   quot;cache.hquot;
85023577   (Junio C Hamano            2006-12-19   14:34:12   -0800    2)   #include   quot;pkt-line.hquot;
77cb17e9   (Michal Ostrowski          2006-01-10   21:12:17   -0500    3)   #include   quot;exec_cmd.hquot;
49ba83fb   (Jon Loeliger              2006-09-19   20:31:51   -0500    4)   #include   quot;interpolate.hquot;
f8ff0c06   (Petr Baudis               2005-09-22   11:25:28   +0200    5)
85023577   (Junio C Hamano            2006-12-19   14:34:12   -0800    6)   #include <syslog.h>
85023577   (Junio C Hamano            2006-12-19   14:34:12   -0800    7)
695dffe2   (Johannes Schindelin       2006-09-28   12:00:35   +0200    8)   #ifndef HOST_NAME_MAX
695dffe2   (Johannes Schindelin       2006-09-28   12:00:35   +0200    9)   #define HOST_NAME_MAX 256
695dffe2   (Johannes Schindelin       2006-09-28   12:00:35   +0200   10)   #endif
695dffe2   (Johannes Schindelin       2006-09-28   12:00:35   +0200   11)
415e7b87   (Patrick Welche            2007-10-18   18:17:39   +0100   12)   #ifndef NI_MAXSERV
415e7b87   (Patrick Welche            2007-10-18   18:17:39   +0100   13)   #define NI_MAXSERV 32
415e7b87   (Patrick Welche            2007-10-18   18:17:39   +0100   14)   #endif
415e7b87   (Patrick Welche            2007-10-18   18:17:39   +0100   15)
9048fe1c   (Petr Baudis               2005-09-24   16:13:01   +0200   16)   static int log_syslog;
f8ff0c06   (Petr Baudis               2005-09-22   11:25:28   +0200   17)   static int verbose;
1955fabf   (Mark Wooding              2006-02-03   20:27:04   +0000   18)   static int reuseaddr;
f8ff0c06   (Petr Baudis               2005-09-22   11:25:28   +0200   19)
960deccb   (H. Peter Anvin            2005-10-19   14:27:01   -0700   20)   static const char daemon_usage[] =
1b1dd23f   (Stephan Beyer             2008-07-13   15:36:15   +0200   21)   quot;git daemon [--verbose] [--syslog] [
3bd62c21   (Stephen R. van den Berg   2008-08-14   20:02:20   +0200   22)   quot;           [--timeout=n] [--init-ti
3bd62c21   (Stephen R. van den Berg   2008-08-14   20:02:20   +0200   23)   quot;           [--strict-paths] [--base
73a7a656   (Jens Axboe                2007-07-27   14:00:29   -0700   24)   quot;           [--user-path | --user-pa
49ba83fb   (Jon Loeliger              2006-09-19   20:31:51   -0500   25)   quot;           [--interpolated-path=pat
678dac6b   (Tilman Sauerbeck          2006-08-22   19:37:41   +0200   26)   quot;           [--reuseaddr] [--detach]
d9edcbd6   (Junio C Hamano            2006-09-07   01:40:04   -0700   27)   quot;           [--[enable|disable|allow
dd467629   (Jon Loeliger              2006-09-26   09:47:43   -0500   28)   quot;           [--inetd | [--listen=hos
dd467629   (Jon Loeliger              2006-09-26   09:47:43   -0500   29)   quot;                      [--user=user
dd467629   (Jon Loeliger              2006-09-26   09:47:43   -0500   30)   quot;           [directory...]quot;;
4ae95682   (H. Peter Anvin            2005-09-26   19:10:55   -0700   31)
4ae95682   (H. Peter Anvin            2005-09-26   19:10:55   -0700   32)   /* List of acceptable pathname prefi
96f1e58f   (David Rientjes            2006-08-15   10:23:48   -0700   33)   static char **ok_paths;
git blame daemon.c
979e32fa   (Randal L. Schwartz        2005-10-25   16:29:09   -0700    1)   #include   quot;cache.hquot;
85023577   (Junio C Hamano            2006-12-19   14:34:12   -0800    2)   #include   quot;pkt-line.hquot;
77cb17e9   (Michal Ostrowski          2006-01-10   21:12:17   -0500    3)   #include   quot;exec_cmd.hquot;
49ba83fb   (Jon Loeliger              2006-09-19   20:31:51   -0500    4)   #include   quot;interpolate.hquot;
f8ff0c06   (Petr Baudis               2005-09-22   11:25:28   +0200    5)
85023577   (Junio C Hamano            2006-12-19   14:34:12   -0800    6)   #include <syslog.h>
85023577   (Junio C Hamano            2006-12-19   14:34:12   -0800    7)
695dffe2   (Johannes Schindelin       2006-09-28   12:00:35   +0200    8)   #ifndef HOST_NAME_MAX
695dffe2   (Johannes Schindelin       2006-09-28   12:00:35   +0200    9)   #define HOST_NAME_MAX 256
695dffe2   (Johannes Schindelin       2006-09-28   12:00:35   +0200   10)   #endif
695dffe2   (Johannes Schindelin       2006-09-28   12:00:35   +0200   11)
415e7b87   (Patrick Welche            2007-10-18   18:17:39   +0100   12)   #ifndef NI_MAXSERV
415e7b87   (Patrick Welche            2007-10-18   18:17:39   +0100   13)   #define NI_MAXSERV 32
415e7b87   (Patrick Welche            2007-10-18   18:17:39   +0100   14)   #endif
415e7b87   (Patrick Welche            2007-10-18   18:17:39   +0100   15)
9048fe1c   (Petr Baudis               2005-09-24   16:13:01   +0200   16)   static int log_syslog;
f8ff0c06   (Petr Baudis               2005-09-22   11:25:28   +0200   17)   static int verbose;
1955fabf   (Mark Wooding              2006-02-03   20:27:04   +0000   18)   static int reuseaddr;
f8ff0c06   (Petr Baudis               2005-09-22   11:25:28   +0200   19)
960deccb   (H. Peter Anvin            2005-10-19   14:27:01   -0700   20)   static const char daemon_usage[] =
1b1dd23f   (Stephan Beyer             2008-07-13   15:36:15   +0200   21)   quot;git daemon [--verbose] [--syslog] [
3bd62c21   (Stephen R. van den Berg   2008-08-14   20:02:20   +0200   22)   quot;           [--timeout=n] [--init-ti
3bd62c21   (Stephen R. van den Berg   2008-08-14   20:02:20   +0200   23)   quot;           [--strict-paths] [--base
73a7a656   (Jens Axboe                2007-07-27   14:00:29   -0700   24)   quot;           [--user-path | --user-pa
49ba83fb   (Jon Loeliger              2006-09-19   20:31:51   -0500   25)   quot;           [--interpolated-path=pat
678dac6b   (Tilman Sauerbeck          2006-08-22   19:37:41   +0200   26)   quot;           [--reuseaddr] [--detach]
d9edcbd6   (Junio C Hamano            2006-09-07   01:40:04   -0700   27)   quot;           [--[enable|disable|allow
dd467629   (Jon Loeliger              2006-09-26   09:47:43   -0500   28)   quot;           [--inetd | [--listen=hos
dd467629   (Jon Loeliger              2006-09-26   09:47:43   -0500   29)   quot;                      [--user=user
dd467629   (Jon Loeliger              2006-09-26   09:47:43   -0500   30)   quot;           [directory...]quot;;
4ae95682   (H. Peter Anvin            2005-09-26   19:10:55   -0700   31)
4ae95682   (H. Peter Anvin            2005-09-26   19:10:55   -0700   32)   /* List of acceptable pathname prefi
96f1e58f   (David Rientjes            2006-08-15   10:23:48   -0700   33)   static char **ok_paths;
git blame daemon.c
979e32fa   (Randal L. Schwartz        2005-10-25   16:29:09   -0700    1)   #include   quot;cache.hquot;
85023577   (Junio C Hamano            2006-12-19   14:34:12   -0800    2)   #include   quot;pkt-line.hquot;
77cb17e9   (Michal Ostrowski          2006-01-10   21:12:17   -0500    3)   #include   quot;exec_cmd.hquot;
49ba83fb   (Jon Loeliger              2006-09-19   20:31:51   -0500    4)   #include   quot;interpolate.hquot;
f8ff0c06   (Petr Baudis               2005-09-22   11:25:28   +0200    5)
85023577   (Junio C Hamano            2006-12-19   14:34:12   -0800    6)   #include <syslog.h>
85023577   (Junio C Hamano            2006-12-19   14:34:12   -0800    7)
695dffe2   (Johannes Schindelin       2006-09-28   12:00:35   +0200    8)   #ifndef HOST_NAME_MAX
695dffe2   (Johannes Schindelin       2006-09-28   12:00:35   +0200    9)   #define HOST_NAME_MAX 256
695dffe2   (Johannes Schindelin       2006-09-28   12:00:35   +0200   10)   #endif
695dffe2   (Johannes Schindelin       2006-09-28   12:00:35   +0200   11)
415e7b87   (Patrick Welche            2007-10-18   18:17:39   +0100   12)   #ifndef NI_MAXSERV
415e7b87   (Patrick Welche            2007-10-18   18:17:39   +0100   13)   #define NI_MAXSERV 32
415e7b87   (Patrick Welche            2007-10-18   18:17:39   +0100   14)   #endif
415e7b87   (Patrick Welche            2007-10-18   18:17:39   +0100   15)
9048fe1c   (Petr Baudis               2005-09-24   16:13:01   +0200   16)   static int log_syslog;
f8ff0c06   (Petr Baudis               2005-09-22   11:25:28   +0200   17)   static int verbose;
1955fabf   (Mark Wooding              2006-02-03   20:27:04   +0000   18)   static int reuseaddr;
f8ff0c06   (Petr Baudis               2005-09-22   11:25:28   +0200   19)
960deccb   (H. Peter Anvin            2005-10-19   14:27:01   -0700   20)   static const char daemon_usage[] =
1b1dd23f   (Stephan Beyer             2008-07-13   15:36:15   +0200   21)   quot;git daemon [--verbose] [--syslog] [
3bd62c21   (Stephen R. van den Berg   2008-08-14   20:02:20   +0200   22)   quot;           [--timeout=n] [--init-ti
3bd62c21   (Stephen R. van den Berg   2008-08-14   20:02:20   +0200   23)   quot;           [--strict-paths] [--base
73a7a656   (Jens Axboe                2007-07-27   14:00:29   -0700   24)   quot;           [--user-path | --user-pa
49ba83fb   (Jon Loeliger              2006-09-19   20:31:51   -0500   25)   quot;           [--interpolated-path=pat
678dac6b   (Tilman Sauerbeck          2006-08-22   19:37:41   +0200   26)   quot;           [--reuseaddr] [--detach]
d9edcbd6   (Junio C Hamano            2006-09-07   01:40:04   -0700   27)   quot;           [--[enable|disable|allow
dd467629   (Jon Loeliger              2006-09-26   09:47:43   -0500   28)   quot;           [--inetd | [--listen=hos
dd467629   (Jon Loeliger              2006-09-26   09:47:43   -0500   29)   quot;                      [--user=user
dd467629   (Jon Loeliger              2006-09-26   09:47:43   -0500   30)   quot;           [directory...]quot;;
4ae95682   (H. Peter Anvin            2005-09-26   19:10:55   -0700   31)
4ae95682   (H. Peter Anvin            2005-09-26   19:10:55   -0700   32)   /* List of acceptable pathname prefi
96f1e58f   (David Rientjes            2006-08-15   10:23:48   -0700   33)   static char **ok_paths;
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks
Smacking Git Around   Advanced Git Tricks

More Related Content

Viewers also liked

An Intro to HTML & CSS
An Intro to HTML & CSSAn Intro to HTML & CSS
An Intro to HTML & CSS
Shay Howe
 
CSS Selectors
CSS SelectorsCSS Selectors
CSS Selectors
Rachel Andrew
 
Git in a nutshell
Git in a nutshellGit in a nutshell
Git in a nutshell
Nelson Tai
 
Intro To Git
Intro To GitIntro To Git
Intro To Git
kyleburton
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
James Gray
 
Fundamental CSS3
Fundamental CSS3Fundamental CSS3
Fundamental CSS3
Achmad Solichin
 
Advanced Git
Advanced GitAdvanced Git
Advanced Gitsegv
 
Getting Git Right
Getting Git RightGetting Git Right
Getting Git Right
Sven Peters
 
Intro to CSS3
Intro to CSS3Intro to CSS3
Intro to CSS3
Denise Jacobs
 
Introduction to Git/Github - A beginner's guide
Introduction to Git/Github - A beginner's guideIntroduction to Git/Github - A beginner's guide
Introduction to Git/Github - A beginner's guide
Rohit Arora
 
Getting Git
Getting GitGetting Git
Getting Git
Scott Chacon
 
Tutorial Git
Tutorial GitTutorial Git
Quick Introduction to git
Quick Introduction to gitQuick Introduction to git
Quick Introduction to git
Joel Krebs
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git Tutorial
Sage Sharp
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
Shawn Calvert
 

Viewers also liked (16)

An Intro to HTML & CSS
An Intro to HTML & CSSAn Intro to HTML & CSS
An Intro to HTML & CSS
 
CSS Selectors
CSS SelectorsCSS Selectors
CSS Selectors
 
Git in a nutshell
Git in a nutshellGit in a nutshell
Git in a nutshell
 
Intro To Git
Intro To GitIntro To Git
Intro To Git
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
 
Fundamental CSS3
Fundamental CSS3Fundamental CSS3
Fundamental CSS3
 
Advanced Git
Advanced GitAdvanced Git
Advanced Git
 
Git Tutorial 教學
Git Tutorial 教學Git Tutorial 教學
Git Tutorial 教學
 
Getting Git Right
Getting Git RightGetting Git Right
Getting Git Right
 
Intro to CSS3
Intro to CSS3Intro to CSS3
Intro to CSS3
 
Introduction to Git/Github - A beginner's guide
Introduction to Git/Github - A beginner's guideIntroduction to Git/Github - A beginner's guide
Introduction to Git/Github - A beginner's guide
 
Getting Git
Getting GitGetting Git
Getting Git
 
Tutorial Git
Tutorial GitTutorial Git
Tutorial Git
 
Quick Introduction to git
Quick Introduction to gitQuick Introduction to git
Quick Introduction to git
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git Tutorial
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
 

More from railsconf

Running The Show Configuration Management With Chef Presentation
Running The Show  Configuration Management With Chef PresentationRunning The Show  Configuration Management With Chef Presentation
Running The Show Configuration Management With Chef Presentation
railsconf
 
Sd208 Ds%2 C0
Sd208 Ds%2 C0Sd208 Ds%2 C0
Sd208 Ds%2 C0
railsconf
 
Rails Is From Mars Ruby Is From Venus Presentation 1
Rails Is From Mars  Ruby Is From Venus Presentation 1Rails Is From Mars  Ruby Is From Venus Presentation 1
Rails Is From Mars Ruby Is From Venus Presentation 1
railsconf
 
Rails 3 And The Real Secret To High Productivity Presentation
Rails 3 And The Real Secret To High Productivity PresentationRails 3 And The Real Secret To High Productivity Presentation
Rails 3 And The Real Secret To High Productivity Presentation
railsconf
 
Quality Code With Cucumber Presentation
Quality Code With Cucumber PresentationQuality Code With Cucumber Presentation
Quality Code With Cucumber Presentation
railsconf
 
J Ruby On Rails Presentation
J Ruby On Rails PresentationJ Ruby On Rails Presentation
J Ruby On Rails Presentation
railsconf
 
Integrating Flex And Rails With Ruby Amf
Integrating Flex And Rails With Ruby AmfIntegrating Flex And Rails With Ruby Amf
Integrating Flex And Rails With Ruby Amf
railsconf
 
Don T Mock Yourself Out Presentation
Don T Mock Yourself Out PresentationDon T Mock Yourself Out Presentation
Don T Mock Yourself Out Presentation
railsconf
 
Gov 2 0 Transparency Collaboration And Participation In Practice Presentation
Gov 2 0  Transparency  Collaboration  And Participation In Practice PresentationGov 2 0  Transparency  Collaboration  And Participation In Practice Presentation
Gov 2 0 Transparency Collaboration And Participation In Practice Presentation
railsconf
 
Crate Packaging Standalone Ruby Applications
Crate  Packaging Standalone Ruby ApplicationsCrate  Packaging Standalone Ruby Applications
Crate Packaging Standalone Ruby Applications
railsconf
 
Develop With Pleasure Deploy With Fun Glass Fish And Net Beans For A Better...
Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better...Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better...
Develop With Pleasure Deploy With Fun Glass Fish And Net Beans For A Better...
railsconf
 
Building A Mini Google High Performance Computing In Ruby
Building A Mini Google  High Performance Computing In RubyBuilding A Mini Google  High Performance Computing In Ruby
Building A Mini Google High Performance Computing In Ruby
railsconf
 
A Z Introduction To Ruby On Rails
A Z Introduction To Ruby On RailsA Z Introduction To Ruby On Rails
A Z Introduction To Ruby On Rails
railsconf
 
The Even Darker Art Of Rails Engines Presentation
The Even Darker Art Of Rails Engines PresentationThe Even Darker Art Of Rails Engines Presentation
The Even Darker Art Of Rails Engines Presentation
railsconf
 
Below And Beneath Tdd Test Last Development And Other Real World Test Patter...
Below And Beneath Tdd  Test Last Development And Other Real World Test Patter...Below And Beneath Tdd  Test Last Development And Other Real World Test Patter...
Below And Beneath Tdd Test Last Development And Other Real World Test Patter...
railsconf
 

More from railsconf (15)

Running The Show Configuration Management With Chef Presentation
Running The Show  Configuration Management With Chef PresentationRunning The Show  Configuration Management With Chef Presentation
Running The Show Configuration Management With Chef Presentation
 
Sd208 Ds%2 C0
Sd208 Ds%2 C0Sd208 Ds%2 C0
Sd208 Ds%2 C0
 
Rails Is From Mars Ruby Is From Venus Presentation 1
Rails Is From Mars  Ruby Is From Venus Presentation 1Rails Is From Mars  Ruby Is From Venus Presentation 1
Rails Is From Mars Ruby Is From Venus Presentation 1
 
Rails 3 And The Real Secret To High Productivity Presentation
Rails 3 And The Real Secret To High Productivity PresentationRails 3 And The Real Secret To High Productivity Presentation
Rails 3 And The Real Secret To High Productivity Presentation
 
Quality Code With Cucumber Presentation
Quality Code With Cucumber PresentationQuality Code With Cucumber Presentation
Quality Code With Cucumber Presentation
 
J Ruby On Rails Presentation
J Ruby On Rails PresentationJ Ruby On Rails Presentation
J Ruby On Rails Presentation
 
Integrating Flex And Rails With Ruby Amf
Integrating Flex And Rails With Ruby AmfIntegrating Flex And Rails With Ruby Amf
Integrating Flex And Rails With Ruby Amf
 
Don T Mock Yourself Out Presentation
Don T Mock Yourself Out PresentationDon T Mock Yourself Out Presentation
Don T Mock Yourself Out Presentation
 
Gov 2 0 Transparency Collaboration And Participation In Practice Presentation
Gov 2 0  Transparency  Collaboration  And Participation In Practice PresentationGov 2 0  Transparency  Collaboration  And Participation In Practice Presentation
Gov 2 0 Transparency Collaboration And Participation In Practice Presentation
 
Crate Packaging Standalone Ruby Applications
Crate  Packaging Standalone Ruby ApplicationsCrate  Packaging Standalone Ruby Applications
Crate Packaging Standalone Ruby Applications
 
Develop With Pleasure Deploy With Fun Glass Fish And Net Beans For A Better...
Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better...Develop With Pleasure  Deploy With Fun  Glass Fish And Net Beans For A Better...
Develop With Pleasure Deploy With Fun Glass Fish And Net Beans For A Better...
 
Building A Mini Google High Performance Computing In Ruby
Building A Mini Google  High Performance Computing In RubyBuilding A Mini Google  High Performance Computing In Ruby
Building A Mini Google High Performance Computing In Ruby
 
A Z Introduction To Ruby On Rails
A Z Introduction To Ruby On RailsA Z Introduction To Ruby On Rails
A Z Introduction To Ruby On Rails
 
The Even Darker Art Of Rails Engines Presentation
The Even Darker Art Of Rails Engines PresentationThe Even Darker Art Of Rails Engines Presentation
The Even Darker Art Of Rails Engines Presentation
 
Below And Beneath Tdd Test Last Development And Other Real World Test Patter...
Below And Beneath Tdd  Test Last Development And Other Real World Test Patter...Below And Beneath Tdd  Test Last Development And Other Real World Test Patter...
Below And Beneath Tdd Test Last Development And Other Real World Test Patter...
 

Recently uploaded

From Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMsFrom Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMs
Sease
 
Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!
Tobias Schneck
 
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
zjhamm304
 
Christine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptxChristine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptx
christinelarrosa
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
Fwdays
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
DanBrown980551
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
Fwdays
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
LizaNolte
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!
Ortus Solutions, Corp
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
DianaGray10
 
Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
UiPathCommunity
 
Getting the Most Out of ScyllaDB Monitoring: ShareChat's Tips
Getting the Most Out of ScyllaDB Monitoring: ShareChat's TipsGetting the Most Out of ScyllaDB Monitoring: ShareChat's Tips
Getting the Most Out of ScyllaDB Monitoring: ShareChat's Tips
ScyllaDB
 
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
Fwdays
 
Day 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio FundamentalsDay 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio Fundamentals
UiPathCommunity
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeckPoznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
FilipTomaszewski5
 
AWS Certified Solutions Architect Associate (SAA-C03)
AWS Certified Solutions Architect Associate (SAA-C03)AWS Certified Solutions Architect Associate (SAA-C03)
AWS Certified Solutions Architect Associate (SAA-C03)
HarpalGohil4
 

Recently uploaded (20)

From Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMsFrom Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMs
 
Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!
 
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
 
Christine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptxChristine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptx
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
 
Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
 
Getting the Most Out of ScyllaDB Monitoring: ShareChat's Tips
Getting the Most Out of ScyllaDB Monitoring: ShareChat's TipsGetting the Most Out of ScyllaDB Monitoring: ShareChat's Tips
Getting the Most Out of ScyllaDB Monitoring: ShareChat's Tips
 
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
 
Day 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio FundamentalsDay 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio Fundamentals
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeckPoznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
 
AWS Certified Solutions Architect Associate (SAA-C03)
AWS Certified Solutions Architect Associate (SAA-C03)AWS Certified Solutions Architect Associate (SAA-C03)
AWS Certified Solutions Architect Associate (SAA-C03)
 

Smacking Git Around Advanced Git Tricks

  • 1. Smacking Git Around by Scott Chacon
  • 2. Me
  • 4.
  • 6. “Scott Chacon has an understandable but borderline unhealthy obsession with Git” - Ilya Grigorik igvita.com
  • 8.
  • 9.
  • 12. </me>
  • 14. GIT
  • 15. Git
  • 16.
  • 17. image by matthew mccullough
  • 18. Scott Chacon Scott Scott Chacon is a Git v1 v2 v3
  • 19.
  • 20. 98ca9.. 34ac2.. f30ab.. commit commit commit size size size tree tree tree 0de24 184ca 92ec2 author parent parent Scott 98ca9 34ac2 committer author author Scott Scott Scott committer committer initial commit of my project Scott Scott fixed bug #1328 - stack add feature #32 - ability to overflow under certain add new formats to the central snapshot A snapshot B snapshot C
  • 21. 98ca9.. e8455.. commit size blob size 0de24.. 0de24.. tree 0de24 == LICENSE: tree size parent nil (The MIT License) author Scott blob e8455 README Copyright (c) 2007 Tom Preston- committer Scott tree 10af9 lib Permission is hereby granted, f my commit message goes here ree of charge, to any person ob and it is really, really cool bc52a.. 10af9.. blob size tree size require 'grit/index' blob bc52a mylib.rb require 'grit/status' tree b70f8 inc module Grit class << self attr_accessor :debug b70f8.. 0ad1a.. tree size size blob blob 0ad1a tricks.rb require 'grit/git-ruby/reposi require 'grit/git-ruby/file_i module Grit module Tricks
  • 22. 98ca9.. e8455.. commit size blob size 0de24.. 0de24.. tree 0de24 == LICENSE: tree size parent nil (The MIT License) author Scott blob e8455 README Copyright (c) 2007 Tom Preston- committer Scott tree 10af9 lib Permission is hereby granted, f my commit message goes here ree of charge, to any person ob and it is really, really cool bc52a.. 10af9.. blob size tree size require 'grit/index' blob bc52a mylib.rb require 'grit/status' tree b70f8 inc module Grit class << self attr_accessor :debug b70f8.. 0ad1a.. tree size size blob blob 0ad1a tricks.rb require 'grit/git-ruby/reposi require 'grit/git-ruby/file_i module Grit module Tricks
  • 23. 0de24.. 22d8858e8513666bf91b82bd2939ec7b0d1974da
  • 24.
  • 25. stable master 98ca9 34ac2 f30ab a23fe 3acd1 topic
  • 26. stable master 98ca9 34ac2 f30ab a23fe 3acd1 topic
  • 27. stable master 98ca9 34ac2 f30ab a23fe 3acd1 topic
  • 28. stable master 98ca9 34ac2 f30ab a23fe 3acd1 topic
  • 29. $ time git checkout -b newbranch Switched to a new branch quot;newbranchquot; real 0m0.040s user 0m0.003s sys 0m0.008s
  • 30. $ time git checkout -b newbranch Switched to a new branch quot;newbranchquot; real 0m0.040s user 0m0.003s sys 0m0.008s
  • 31.
  • 33.
  • 34. distributed development image by matthew mccullough
  • 36.
  • 37.
  • 38. C
  • 39. fast
  • 41.
  • 44.
  • 46. Git Tips and Tricks
  • 47. Tips and Tricks Selection and Ranges Data Munging Debugging Customizing
  • 50. Revision Selection alternate ways to refer to objects or ranges of objects
  • 51. Revision Selection full sha-1 partial sha-1 branch or tag name caret parent tilde spec blob spec relative specs ranges
  • 54. Branch, Remote or Tag Name v1.0 default m/cupcake
  • 55. Caret Parent default^2 2nd parent of ‘default’
  • 56. b3be1 a09c6 df2fa c36ae 5ec47 ce0e4 2f45e 4eadf 2fbb3 18cae jess/master master
  • 57. master^ b3be1 a09c6 df2fa c36ae 5ec47 ce0e4 2f45e 4eadf 2fbb3 18cae jess/master master
  • 58. master^2 b3be1 a09c6 df2fa c36ae 5ec47 ce0e4 2f45e 4eadf 2fbb3 18cae jess/master master
  • 59. Tilde Spec default~2 grandparent of ‘default’ (parent of the parent)
  • 60. master~2 b3be1 a09c6 df2fa c36ae 5ec47 ce0e4 2f45e 4eadf 2fbb3 18cae jess/master master
  • 61. master^^^2 master~2^2 b3be1 a09c6 df2fa c36ae 5ec47 ce0e4 2f45e 4eadf 2fbb3 18cae jess/master master
  • 62. master^^^2 master~2^2 b3be1 a09c6 df2fa c36ae 5ec47 ce0e4 2f45e 4eadf 2fbb3 18cae jess/master master
  • 63. master^^^2 master~2^2 b3be1 a09c6 df2fa c36ae 5ec47 ce0e4 2f45e 4eadf 2fbb3 18cae jess/master master
  • 64. Blob Spec default:path/to/file blob of that file in ‘default’ commit
  • 65. Relative Specs master@{yesterday} the commit ‘master’ was at yesterday
  • 66. Relative Specs master@{5} the 5th prior value of ‘master’ (locally)
  • 68. Ranges ce0e4..e4272 every commit reachable by e4272 that is not reachable by ce034
  • 69. Ranges [old]..[new] every commit reachable by [new] that is not reachable by [old]
  • 70. Ranges ce0e4.. everything since a commit
  • 72. jess/master..master b3be1 a09c6 df2fa c36ae 5ec47 ce0e4 2f45e 4eadf 2fbb3 18cae jess/master master
  • 73. jess/master..master b3be1 a09c6 df2fa c36ae 5ec47 ce0e4 2f45e 4eadf 2fbb3 18cae jess/master master
  • 74. jess/master..master b3be1 a09c6 df2fa c36ae 5ec47 ce0e4 2f45e 4eadf 2fbb3 18cae jess/master master
  • 75. jess/master..master b3be1 a09c6 df2fa c36ae 5ec47 ce0e4 2f45e 4eadf 2fbb3 18cae jess/master master
  • 76. jess/master..master b3be1 a09c6 df2fa c36ae 5ec47 ce0e4 2f45e 4eadf 2fbb3 18cae jess/master master
  • 77. jess/master..master b3be1 a09c6 df2fa c36ae 5ec47 ce0e4 2f45e 4eadf 2fbb3 18cae jess/master master
  • 78. jess/master..master b3be1 a09c6 df2fa c36ae 5ec47 ce0e4 2f45e 4eadf 2fbb3 18cae jess/master master
  • 79. jess/master..master b3be1 a09c6 df2fa c36ae 5ec47 ce0e4 2f45e 4eadf 2fbb3 18cae jess/master master
  • 80. jess/master..c36ae b3be1 a09c6 df2fa c36ae 5ec47 ce0e4 2f45e 4eadf 2fbb3 18cae jess/master master
  • 81. jess/master..c36ae b3be1 a09c6 df2fa c36ae 5ec47 ce0e4 2f45e 4eadf 2fbb3 18cae jess/master master
  • 82. jess/master..c36ae b3be1 a09c6 df2fa c36ae 5ec47 ce0e4 2f45e 4eadf 2fbb3 18cae jess/master master
  • 83. jess/master..c36ae b3be1 a09c6 df2fa c36ae 5ec47 ce0e4 2f45e 4eadf 2fbb3 18cae jess/master master
  • 86. what am I going to push?
  • 88. C1 origin/master master HEAD C0
  • 89. C4 master HEAD C3 C2 C1 origin/master C0
  • 90. C7 C4 origin/master master HEAD C6 C3 C5 C2 C1 git fetch origin C0
  • 91. C7 C4 origin/master master HEAD C6 C3 C5 C2 C1 git log origin/master.. C0
  • 92. C7 C4 origin/master master HEAD C6 C3 C5 C2 C1 git log origin/master..HEAD C0
  • 93. C7 C4 origin/master master HEAD C6 C3 C5 C2 C1 git log origin/master..HEAD C0
  • 94. C7 C4 origin/master master HEAD C6 C3 C5 C2 C1 git log origin/master..HEAD C0
  • 95. C7 C4 origin/master master HEAD C6 C3 C5 C2 C1 git log origin/master..HEAD C0
  • 96. commit 72d404debaa804fca82fd9cf710fbde48c7305c6 Author: Shawn O. Pearce <spearce@spearce.org> Date: Sun Oct 12 13:13:59 2008 -0700 test-lib: fix broken printf b8eecafd888d219633f4c29e8b6a90fc21a46dfd introduced usage of printf without a format string. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> commit 969c877506cf8cc760c7b251fef6c5b6850bfc19 Author: Jeff King <peff@peff.net> Date: Sun Oct 12 00:06:11 2008 -0400 git apply --directory broken for new files We carefully verify that the input to git-apply is sane, including cross-checking that the filenames we see in quot;+++quot; headers match what was provided on the command line of quot;diff --gitquot;. When --directory is used, however, we ended up comparing the unadorned name to one with the prepended root, causing us to complain about a mismatch. We simply need to prepend the root directory, if any, when pulling the name out of the git header. commit ff74126c03a8dfd04e7533573a5c420f2a7112ac Author: Johannes Schindelin <Johannes.Schindelin@gmx.de> Date: Fri Oct 10 13:42:12 2008 +0200 rebase -i: do not fail when there is no commit to cherry-pick
  • 97. commit 72d404debaa804fca82fd9cf710fbde48c7305c6 C4 Author: Shawn O. Pearce <spearce@spearce.org> Date: Sun Oct 12 13:13:59 2008 -0700 test-lib: fix broken printf b8eecafd888d219633f4c29e8b6a90fc21a46dfd introduced usage of printf without a format string. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> commit 969c877506cf8cc760c7b251fef6c5b6850bfc19 C3 Author: Jeff King <peff@peff.net> Date: Sun Oct 12 00:06:11 2008 -0400 git apply --directory broken for new files We carefully verify that the input to git-apply is sane, including cross-checking that the filenames we see in quot;+++quot; headers match what was provided on the command line of quot;diff --gitquot;. When --directory is used, however, we ended up comparing the unadorned name to one with the prepended root, causing us to complain about a mismatch. We simply need to prepend the root directory, if any, when pulling the name out of the git header. commit ff74126c03a8dfd04e7533573a5c420f2a7112ac C2 Author: Johannes Schindelin <Johannes.Schindelin@gmx.de> Date: Fri Oct 10 13:42:12 2008 +0200 rebase -i: do not fail when there is no commit to cherry-pick
  • 98. C7 C4 origin/master master HEAD C6 C3 C5 C2 C1 git log origin/master .. HEAD C0
  • 99. C7 C4 origin/master master HEAD C6 C3 C5 C2 C1 git log HEAD .. origin/master C0
  • 100. C7 C4 origin/master master HEAD C6 C3 C5 C2 C1 git log HEAD .. origin/master C0 “commits in origin/master not in HEAD”
  • 101. git log origin/master.. git log origin/master..HEAD git log origin/master..master git log master ^origin/master git log master --not origin/master
  • 102. git log HEAD ^origin/master
  • 103. git log HEAD ^origin/master
  • 104. git log master topic1 ^origin/master
  • 105. origin/master C1 C0
  • 106. master C3 origin/master C1 C0
  • 107. experiment C10 C9 C8 master C3 origin/master C1 C0
  • 108. experiment C10 master origin/master C9 C7 C5 C6 C4 C8 C2 C3 C1 C0
  • 109. which changes aren’t in experiment?
  • 110. git log origin/master master ^experiment experiment C10 master origin/master C9 C7 C5 C6 C4 C8 C2 C3 C1 C0
  • 111. git log origin/master master ^experiment experiment C10 master origin/master C9 C7 C5 C6 C4 C8 C2 C3 C1 C0
  • 112. git log origin/master master ^experiment experiment C10 master origin/master C9 C7 C5 C6 C4 C8 C2 C3 C1 C0
  • 113. git log origin/master master ^experiment experiment C10 master origin/master C9 C7 C5 C6 C4 C8 C2 C3 C1 C0
  • 114. git log origin/master master ^experiment experiment C10 master origin/master C9 C7 C5 C6 C4 C8 C2 C3 C1 C0
  • 115. git log origin/master master ^experiment experiment C10 master origin/master C9 C7 C5 C6 C4 C8 C2 C3 C1 C0
  • 116. git log origin/master master ^experiment experiment C10 master origin/master C9 C7 C5 C6 C4 C8 C2 C3 C1 C0
  • 119. gitk
  • 122. git diff revA revB
  • 123. $ echo ‘version one’ > test $ git add test $ git commit -m ‘C1’ master C1
  • 124. $ git checkout -b topic $ echo ‘version two’ >> test $ git commit -m ‘C2’ topic C2 master C1
  • 125. $ echo ‘version three’ >> test $ git commit -m ‘C3’ topic C3 C2 master C1
  • 126. $ git checkout master $ echo ‘version four’ >> test $ git commit -m ‘C4’ topic C3 master C4 C2 C1
  • 127. $ echo ‘version five’ >> test $ git commit -m ‘C5’ master topic C5 C3 C4 C2 C1
  • 128. master topic $ git diff topic C5 C3 C4 C2 C1
  • 129. master topic what does topic have $ git diff topic C5 C3 that I don’t have? C4 C2 C1
  • 130. master topic what would happen if I $ git diff topic C5 C3 merged in topic? C4 C2 C1
  • 131. master topic how do I make topic $ git diff topic C5 C3 look like HEAD? C4 C2 C1
  • 132. $ git diff topic diff --git a/test b/test master topic index 304313d..bd8c6c9 100644 --- a/test +++ b/test C5 C3 @@ -1,3 +1,3 @@ version one -version two -version three C4 C2 +version four +version five C1
  • 133. $ git diff topic diff --git a/test b/test master topic index 304313d..bd8c6c9 100644 --- a/test +++ b/test C5 C3 @@ -1,3 +1,3 @@ version one -version two -version three C4 C2 +version four +version five C1
  • 134. $ git diff HEAD topic diff --git a/test b/test master topic index bd8c6c9..304313d 100644 --- a/test +++ b/test C5 C3 @@ -1,3 +1,3 @@ version one -version four -version five C4 C2 +version two +version three C1
  • 135. $ git diff HEAD topic diff --git a/test b/test master topic index bd8c6c9..304313d 100644 --- a/test +++ b/test C5 C3 @@ -1,3 +1,3 @@ version one -version four -version five C4 C2 +version two +version three C1
  • 136. git diff HEAD topic
  • 139. $ git diff HEAD topic master topic C5 C3 C4 C2 C1
  • 140. $ git diff HEAD topic master topic C5 C3 C4 C2 C1
  • 141. $ git diff HEAD...topic master topic C5 C3 C4 C2 C1
  • 142. $ git diff HEAD...topic diff --git a/test b/test master topic index 9bc69cf..304313d 100644 --- a/test +++ b/test @@ -1 +1,3 @@ C5 C3 version one +version two +version three C4 C2 C1
  • 143. $ git diff HEAD...topic diff --git a/test b/test master topic index 9bc69cf..304313d 100644 --- a/test what would happen if I +++ b/test @@ -1 +1,3 @@ C5 C3 merged in topic? version one +version two +version three C4 C2 C1
  • 149. master topic C5 C3 C4 C2 C1
  • 150. topic C6 master C5 C3 C4 C2 C1 git merge master
  • 151. master topic C5 C3 C4 C2 C1 git rebase master
  • 152. master topic C5 C3 C4 C2 C1 git rebase master
  • 153. master topic C5 C3 C4 C2 C1 git rebase master
  • 154. master topic C5 C3 C4 C2 C1 git rebase master
  • 155. master topic git diff c2 c3 > 2-3.patch C5 C3 C4 C2 C1 git rebase master
  • 156. master topic git diff c2 c3 > 2-3.patch C5 C3 diff --git a/test b/test index 2eadcec..bd8c6c9 100644 --- a/test C4 C2 +++ b/test @@ -1,2 +1,3 @@ version one version four C1 +version five git rebase master
  • 157. master topic C5 C3 C4 C2 C1 2-3.patch
  • 158. master topic C5 C3 C4 C2 git diff c1 c2 > 1-2.patch C1 2-3.patch
  • 159. master topic C5 C3 C4 C2 git diff c1 c2 > 1-2.patch 1-2.patch C1 2-3.patch
  • 160. master topic C5 C3 C4 C2 1-2.patch C1 2-3.patch
  • 161. git rebase master master topic C5 C3 C4 C2 1-2.patch C1 2-3.patch
  • 162. git rebase master 1-2.patch master topic C5 C3 C4 C2 C1 2-3.patch
  • 163. git rebase master topic master C2' C5 C3 C4 C2 C1 2-3.patch
  • 164. git rebase master 2-3.patch topic master C2' C5 C3 C4 C2 C1
  • 165. topic git rebase master C3' master C2' C5 C3 C4 C2 C1
  • 166. topic C3' master C2' git rebase master C5 C3 C4 C2 C1
  • 167. topic C3' master C2' git rebase master C5 C3 C4 C2 C1
  • 168. topic C3' C2' git rebase master C5 master C4 C1
  • 171. Transplanting Topic Branches
  • 172. master C1 C2
  • 173. master C1 C2 C3 server
  • 174. master C1 C2 C3 server C8 C9 client
  • 175. master C1 C2 C3 C4 C10 server C8 C9 client
  • 176. master C1 C2 C5 C6 C3 C4 C10 server C8 C9 client
  • 177. move your ‘client’ branch work to your ‘master’ branch
  • 178. master C1 C2 C5 C6 C3 C4 C10 server C8 C9 client
  • 179. master C1 C2 C5 C6 C3 C4 C10 server C8 C9 client
  • 180. master C1 C2 C5 C6 C3 C4 C10 server C8 C9 client git rebase master
  • 181. master C1 C2 C5 C6 C3 C4 C10 server C8 C9 client git rebase master
  • 182. master C1 C2 C5 C6 C3 C4 C10 server C8 C9 client git rebase master
  • 183. master C1 C2 C5 C6 C3 C4 C10 server C8 C9 client git rebase master
  • 184. master C1 C2 C5 C6 C3 C4 C10 server C8 C9 client git rebase server
  • 185. master C1 C2 C5 C6 C3 C4 C10 server C8 C9 client git rebase server
  • 186. master C1 C2 C5 C6 C3 C4 C10 server C8 C9 client git rebase server
  • 187. master C1 C2 C5 C6 C3 C4 C10 server C8 C9 client git rebase server
  • 188. master C1 C2 C5 C6 C3 C4 C10 server C8 C9 client git rebase --onto master server
  • 189. master C1 C2 C5 C6 C3 C4 C10 server C8 C9 client git rebase --onto master server
  • 190. master C1 C2 C5 C6 C3 C4 C10 server C8 C9 client git rebase --onto master server
  • 191. master C1 C2 C5 C6 C3 C4 C10 server C8 C9 client git rebase --onto master server
  • 192. master client master C1 C5 C6 C8' C9' C1 C2 C6 C8 C9 C3 C4 C10 C4 C10 server server C8 C9 C8 C9 client
  • 193. master client C1 C2 C5 C6 C8' C9' C3 C4 C10 server C8 C9
  • 194. master client C1 C2 C5 C6 C8' C9' C3 C4 C10 server C8 C9 git checkout server git rebase master
  • 195. master client C1 C2 C5 C6 C8' C9' C3 C4 C10 server C8 C9 git checkout server git rebase client
  • 196. master client C1 C2 C5 C6 C8' C9' C3 C4 C10 server C8 C9 git checkout server git rebase client
  • 197. master client client C1 C2 C5 C6 C8' C9' C6 C3' C4' C10' C3 C4 C10 server C8 C9 git checkout server git rebase client
  • 198. client client server master C3' C10' C1 C1 C2 C2 C5 C5 C6 C6 C8' C8' C9' C9' C3' C4' git checkout server git rebase client
  • 199. client server master C1 C2 C5 C6 C8' C9' C3' C4' C10' git checkout server git rebase client
  • 200. transplant some of a topic branch
  • 201. master C0 C1 C2 C3 C4 C5 topic
  • 202. master C0 C1 C2 C3 C4 C5 topic
  • 203. master C0 C1 C2 C3 C4 C5 topic git branch newtopic C3
  • 204. master C0 C1 C2 C3 C4 C5 newtopic topic git branch newtopic C3
  • 205. master C0 C1 C2 C3 C4 C5 newtopic topic git branch newtopic C3 git rebase --onto master newtopic
  • 206. master topic C4' C5' C0 C1 C2 C3 C4 C5 newtopic git branch newtopic C3 git rebase --onto master newtopic
  • 207. Fixing a commit several back
  • 208. git rebase -i git rebase --interactive
  • 209. default C4 C3 C2 C1 C0
  • 210. default C4 C3 C2 C1 C0
  • 211. default C4 C3 default~2 C2 C1 C0
  • 212. default C4 C3 default~2 C2 C1 C0
  • 213. git rebase -i default~2^
  • 214. git rebase -i default~2^
  • 215. git rebase -i default~2^
  • 216. pick 969c877 git apply --directory broken for new files pick b75271d git diff <tree>{3,}: do not reverse order of args pick 72d404d test-lib: fix broken printf # Rebase f285a2d..5c283eb onto f285a2d # # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. # ~ ~ ~ ~ ~ quot;~/projects/git/.git/rebase-merge/git-rebase-todoquot; 14L, 472C
  • 217. C2 pick 969c877 git apply --directory broken for new files pick b75271d git diff <tree>{3,}: do not reverse order of args C3 pick 72d404d test-lib: fix broken printf C4 # Rebase f285a2d..5c283eb onto f285a2d # # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. # ~ ~ ~ ~ ~ quot;~/projects/git/.git/rebase-merge/git-rebase-todoquot; 14L, 472C
  • 218. pick 969c877 git apply --directory broken for new files pick b75271d git diff <tree>{3,}: do not reverse order of args pick 72d404d test-lib: fix broken printf # Rebase f285a2d..5c283eb onto f285a2d # # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. # ~ ~ ~ ~ ~ quot;~/projects/git/.git/rebase-merge/git-rebase-todoquot; 14L, 472C
  • 219. pick 969c877 git apply --directory broken for new files pick b75271d git diff <tree>{3,}: do not reverse order of args pick 72d404d test-lib: fix broken printf # Rebase f285a2d..5c283eb onto f285a2d # # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. # ~ ~ ~ ~ ~ quot;~/projects/git/.git/rebase-merge/git-rebase-todoquot; 14L, 472C
  • 220. pick 969c877 git apply --directory broken for new files pick b75271d git diff <tree>{3,}: do not reverse order of args pick 72d404d test-lib: fix broken printf # Rebase f285a2d..5c283eb onto f285a2d # # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. # ~ ~ ~ ~ ~ quot;~/projects/git/.git/rebase-merge/git-rebase-todoquot; 14L, 472C
  • 221. pick 969c877 git apply --directory broken for new files pick b75271d git diff <tree>{3,}: do not reverse order of args pick 72d404d test-lib: fix broken printf # Rebase f285a2d..5c283eb onto f285a2d # # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. # ~ ~ ~ ~ ~ quot;~/projects/git/.git/rebase-merge/git-rebase-todoquot; 14L, 472C
  • 222. pick 969c877 git apply --directory broken for new files pick b75271d git diff <tree>{3,}: do not reverse order of args pick 72d404d test-lib: fix broken printf # Rebase f285a2d..5c283eb onto f285a2d # # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. # ~ ~ ~ ~ ~ quot;~/projects/git/.git/rebase-merge/git-rebase-todoquot; 14L, 472C
  • 223. edit 969c877 git apply --directory broken for new files pick b75271d git diff <tree>{3,}: do not reverse order of args pick 72d404d test-lib: fix broken printf # Rebase f285a2d..5c283eb onto f285a2d # # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. # ~ ~ ~ ~ ~ quot;~/projects/git/.git/rebase-merge/git-rebase-todoquot; 14L, 472C
  • 224. $ git rebase -i default~2^ Stopped at 969c877... git apply --directory broken for new files You can amend the commit now, with git commit --amend Once you are satisfied with your changes, run git rebase --continue $_
  • 225. $ git rebase -i default~2^ Stopped at 969c877... git apply --directory broken for new files You can amend the commit now, with git commit --amend Once you are satisfied with your changes, run git rebase --continue $_ edit files git add git commit --amend git rebase --continue
  • 226. $ git rebase -i default~2^ Stopped at 969c877... git apply --directory broken for new files You can amend the commit now, with git commit --amend Once you are satisfied with your changes, run git rebase --continue $_ edit files git add git commit --amend git rebase --continue
  • 227. $ git rebase -i default~2^ Stopped at 969c877... git apply --directory broken for new files You can amend the commit now, with git commit --amend Once you are satisfied with your changes, run git rebase --continue $_ edit files git add git commit --amend git rebase --continue
  • 228. $ git rebase -i default~2^ Stopped at 969c877... git apply --directory broken for new files You can amend the commit now, with git commit --amend Once you are satisfied with your changes, run git rebase --continue $_ edit files git add git commit --amend git rebase --continue
  • 229. default C4 C4' C3 C3' C2 C2' C1 C0
  • 230. default C4 C4' C3 C3' C2 C2' C1 C0
  • 231. default C4 C4' C3 C3' C2 C2' C1 C0
  • 232. Squashing commits together
  • 233. pick 969c877 git apply --directory broken for new files pick b75271d git diff <tree>{3,}: do not reverse order of args pick 72d404d test-lib: fix broken printf # Rebase f285a2d..5c283eb onto f285a2d # # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. # ~ ~ ~ ~ ~ quot;~/projects/git/.git/rebase-merge/git-rebase-todoquot; 14L, 472C
  • 234. pick 969c877 git apply --directory broken for new files squash b75271d git diff <tree>{3,}: do not reverse order of args squash 72d404d test-lib: fix broken printf # Rebase f285a2d..5c283eb onto f285a2d # # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. # ~ ~ ~ ~ ~ quot;~/projects/git/.git/rebase-merge/git-rebase-todoquot; 14L, 472C
  • 235. # This is a combination of 3 commits. # The first commit's message is: git apply --directory broken for new files # This is the 2nd commit message: git diff <tree>{3,}: do not reverse order of args # This is the 3rd commit message: test-lib: fix broken printf # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # Author: Jeff King <peff@peff.net> # # Not currently on any branch. # Changes to be committed: # (use quot;git reset HEAD <file>...quot; to unstage) # # modified: builtin-apply.c # modified: builtin-diff.c # modified: t/t4013-diff-various.sh # new file: t/t4013/diff.diff_master_master^_side # modified: t/t4128-apply-root.sh # modified: t/test-lib.sh # ~ ~ quot;.git/COMMIT_EDITMSGquot; 39L, 1454C
  • 236. # This is a combination of 3 commits. # The first commit's message is: git apply --directory broken for new files # This is the 2nd commit message: git diff <tree>{3,}: do not reverse order of args # This is the 3rd commit message: test-lib: fix broken printf # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # Author: Jeff King <peff@peff.net> # # Not currently on any branch. # Changes to be committed: # (use quot;git reset HEAD <file>...quot; to unstage) # # modified: builtin-apply.c # modified: builtin-diff.c # modified: t/t4013-diff-various.sh # new file: t/t4013/diff.diff_master_master^_side # modified: t/t4128-apply-root.sh # modified: t/test-lib.sh # ~ ~ quot;.git/COMMIT_EDITMSGquot; 39L, 1454C
  • 237. # This is a combination of 3 commits. # The first commit's message is: git apply --directory broken for new files # This is the 2nd commit message: git diff <tree>{3,}: do not reverse order of args # This is the 3rd commit message: test-lib: fix broken printf # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # Author: Jeff King <peff@peff.net> # # Not currently on any branch. # Changes to be committed: # (use quot;git reset HEAD <file>...quot; to unstage) # # modified: builtin-apply.c # modified: builtin-diff.c # modified: t/t4013-diff-various.sh # new file: t/t4013/diff.diff_master_master^_side # modified: t/t4128-apply-root.sh # modified: t/test-lib.sh # ~ ~ quot;.git/COMMIT_EDITMSGquot; 39L, 1454C
  • 238. # This is a combination of 3 commits. # The first commit's message is: git apply --directory broken for new files # This is the 2nd commit message: git diff <tree>{3,}: do not reverse order of args # This is the 3rd commit message: test-lib: fix broken printf # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # Author: Jeff King <peff@peff.net> # # Not currently on any branch. # Changes to be committed: # (use quot;git reset HEAD <file>...quot; to unstage) # # modified: builtin-apply.c # modified: builtin-diff.c # modified: t/t4013-diff-various.sh # new file: t/t4013/diff.diff_master_master^_side # modified: t/t4128-apply-root.sh # modified: t/test-lib.sh # ~ ~ quot;.git/COMMIT_EDITMSGquot; 39L, 1454C
  • 239. C4 C3 default C2 C5 C1 C0
  • 241. scott jessica default C1 C0
  • 242. scott jessica default C4 C3 C2 default scott/default C1 C1 C0 C0
  • 243. scott jessica default scott/default default C7 C7 C4 C6 C6 C3 C5 C5 C2 C1 C1 C0 C0
  • 244. scott jessica default C8 scott/default default C7 C7 C4 C6 C6 C3 C5 C5 C2 C1 C1 C0 C0
  • 245. scott jessica default C8 scott/default default C7 C7 C7' C4 C6 C6 C6' C3 C5 C5 C5' C2 C1 C1 C0 C0
  • 246. scott jessica default C8 scott/default default C7' C7 C7 C7' C4 C6' C6 C6 C6' C3 C5' C5 C5 C5' C2 C1 C1 C0 C0
  • 247. scott jessica default C9 C8 scott/default default C7' C7 C7 C7' C4 C6' C6 C6 C6' C3 C5' C5 C5 C5' C2 C1 C1 C0 C0
  • 249. remove all instances of a file from every commit
  • 251. change your email in all commits
  • 252. git filter-branch --env-filter quot;export GIT_AUTHOR_EMAIL=you@email.comquot; HEAD
  • 253. git filter-branch --env-filter quot;export GIT_AUTHOR_EMAIL=you@email.comquot; origin/master..HEAD
  • 256. $ ls README rack_app.rb $ git remote add rack_remote git@github.com:schacon/rack.git $ git fetch rack_remote warning: no common commits remote: Counting objects: 3184, done. remote: Compressing objects: 100% (1465/1465), done. remote: Total 3184 (delta 1952), reused 2770 (delta 1675) Receiving objects: 100% (3184/3184), 677.42 KiB | 4 KiB/s, do Resolving deltas: 100% (1952/1952), done. From git@github.com:schacon/rack * [new branch] master -> rack_remote/master $ git checkout -b rack_branch rack_remote/master Branch rack_branch set up to track remote branch refs/remotes Switched to a new branch quot;rack_branchquot; $ ls AUTHORS KNOWN-ISSUES Rakefile contrib lib COPYING README bin example test
  • 257. master C3 C2 C1 C0
  • 258. $ ls README rack_app.rb $ git remote add rack_remote git@github.com:schacon/rack.git $ git fetch rack_remote warning: no common commits remote: Counting objects: 3184, done. remote: Compressing objects: 100% (1465/1465), done. remote: Total 3184 (delta 1952), reused 2770 (delta 1675) Receiving objects: 100% (3184/3184), 677.42 KiB | 4 KiB/s, do Resolving deltas: 100% (1952/1952), done. From git@github.com:schacon/rack * [new branch] master -> rack_remote/master $ git checkout -b rack_branch rack_remote/master Branch rack_branch set up to track remote branch refs/remotes Switched to a new branch quot;rack_branchquot; $ ls AUTHORS KNOWN-ISSUES Rakefile contrib lib COPYING README bin example test
  • 259. $ ls README rack_app.rb $ git remote add rack_remote git@github.com:schacon/rack.git $ git fetch rack_remote warning: no common commits remote: Counting objects: 3184, done. remote: Compressing objects: 100% (1465/1465), done. remote: Total 3184 (delta 1952), reused 2770 (delta 1675) Receiving objects: 100% (3184/3184), 677.42 KiB | 4 KiB/s, do Resolving deltas: 100% (1952/1952), done. From git@github.com:schacon/rack * [new branch] master -> rack_remote/master $ git checkout -b rack_branch rack_remote/master Branch rack_branch set up to track remote branch refs/remotes Switched to a new branch quot;rack_branchquot; $ ls AUTHORS KNOWN-ISSUES Rakefile contrib lib COPYING README bin example test
  • 260. $ ls README rack_app.rb $ git remote add rack_remote git@github.com:schacon/rack.git $ git fetch rack_remote warning: no common commits remote: Counting objects: 3184, done. remote: Compressing objects: 100% (1465/1465), done. remote: Total 3184 (delta 1952), reused 2770 (delta 1675) Receiving objects: 100% (3184/3184), 677.42 KiB | 4 KiB/s, do Resolving deltas: 100% (1952/1952), done. From git@github.com:schacon/rack * [new branch] master -> rack_remote/master $ git checkout -b rack_branch rack_remote/master Branch rack_branch set up to track remote branch refs/remotes Switched to a new branch quot;rack_branchquot; $ ls AUTHORS KNOWN-ISSUES Rakefile contrib lib COPYING README bin example test
  • 261. $ ls README rack_app.rb $ git remote add rack_remote git@github.com:schacon/rack.git $ git fetch rack_remote warning: no common commits remote: Counting objects: 3184, done. remote: Compressing objects: 100% (1465/1465), done. remote: Total 3184 (delta 1952), reused 2770 (delta 1675) Receiving objects: 100% (3184/3184), 677.42 KiB | 4 KiB/s, do Resolving deltas: 100% (1952/1952), done. From git@github.com:schacon/rack * [new branch] master -> rack_remote/master $ git checkout -b rack_branch rack_remote/master Branch rack_branch set up to track remote branch refs/remotes Switched to a new branch quot;rack_branchquot; $ ls AUTHORS KNOWN-ISSUES Rakefile contrib lib COPYING README bin example test
  • 262. $ ls README rack_app.rb $ git remote add rack_remote git@github.com:schacon/rack.git $ git fetch rack_remote warning: no common commits remote: Counting objects: 3184, done. remote: Compressing objects: 100% (1465/1465), done. remote: Total 3184 (delta 1952), reused 2770 (delta 1675) Receiving objects: 100% (3184/3184), 677.42 KiB | 4 KiB/s, do Resolving deltas: 100% (1952/1952), done. From git@github.com:schacon/rack * [new branch] master -> rack_remote/master $ git checkout -b rack_branch rack_remote/master Branch rack_branch set up to track remote branch refs/remotes Switched to a new branch quot;rack_branchquot; $ ls AUTHORS KNOWN-ISSUES Rakefile contrib lib COPYING README bin example test
  • 263. $ ls README rack_app.rb $ git remote add rack_remote git@github.com:schacon/rack.git $ git fetch rack_remote warning: no common commits remote: Counting objects: 3184, done. remote: Compressing objects: 100% (1465/1465), done. remote: Total 3184 (delta 1952), reused 2770 (delta 1675) Receiving objects: 100% (3184/3184), 677.42 KiB | 4 KiB/s, do Resolving deltas: 100% (1952/1952), done. From git@github.com:schacon/rack * [new branch] master -> rack_remote/master $ git checkout -b rack_branch rack_remote/master Branch rack_branch set up to track remote branch refs/remotes Switched to a new branch quot;rack_branchquot; $ ls AUTHORS KNOWN-ISSUES Rakefile contrib lib COPYING README bin example test
  • 264. $ ls README rack_app.rb $ git remote add rack_remote git@github.com:schacon/rack.git $ git fetch rack_remote warning: no common commits remote: Counting objects: 3184, done. remote: Compressing objects: 100% (1465/1465), done. remote: Total 3184 (delta 1952), reused 2770 (delta 1675) Receiving objects: 100% (3184/3184), 677.42 KiB | 4 KiB/s, do Resolving deltas: 100% (1952/1952), done. From git@github.com:schacon/rack * [new branch] master -> rack_remote/master $ git checkout -b rack_branch rack_remote/master Branch rack_branch set up to track remote branch refs/remotes Switched to a new branch quot;rack_branchquot; $ ls AUTHORS KNOWN-ISSUES Rakefile contrib lib COPYING README bin example test
  • 265. $ ls README rack_app.rb $ git remote add rack_remote git@github.com:schacon/rack.git $ git fetch rack_remote warning: no common commits remote: Counting objects: 3184, done. remote: Compressing objects: 100% (1465/1465), done. remote: Total 3184 (delta 1952), reused 2770 (delta 1675) Receiving objects: 100% (3184/3184), 677.42 KiB | 4 KiB/s, do Resolving deltas: 100% (1952/1952), done. From git@github.com:schacon/rack * [new branch] master -> rack_remote/master $ git checkout -b rack_branch rack_remote/master Branch rack_branch set up to track remote branch refs/remotes Switched to a new branch quot;rack_branchquot; $ ls AUTHORS KNOWN-ISSUES Rakefile contrib lib COPYING README bin example test
  • 266. master C3 rack_branch C6 rack_remote/master C2 C5 C1 C0 C4
  • 267. $ git checkout master $ ls README rack_app.rb $ git checkout rack_branch $ ls AUTHORS KNOWN-ISSUES Rakefile contrib lib COPYING README bin example test
  • 268. $ git checkout master $ ls README rack_app.rb $ git checkout rack_branch $ ls AUTHORS KNOWN-ISSUES Rakefile contrib lib COPYING README bin example test
  • 269. $ git checkout master $ ls README rack_app.rb $ git checkout rack_branch $ ls AUTHORS KNOWN-ISSUES Rakefile contrib lib COPYING README bin example test
  • 270. $ git checkout master $ ls README rack_app.rb $ git checkout rack_branch $ ls AUTHORS KNOWN-ISSUES Rakefile contrib lib COPYING README bin example test
  • 272. $ git read-tree --prefix=rack/ -u rack_branch $ ls README rack rack_app.rb $ ls rack AUTHORS KNOWN-ISSUES Rakefile contrib lib COPYING README bin example test $ git add rack $ git commit -m 'added rack code' [master 0839fd8] added rack code 108 files changed, 10334 insertions(+), 0 dele create mode 100644 rack/AUTHORS create mode 100644 rack/COPYING ... create mode 100644 rack/test/testrequest.rb
  • 273. $ git read-tree --prefix=rack/ -u rack_branch $ ls README rack rack_app.rb $ ls rack AUTHORS KNOWN-ISSUES Rakefile contrib lib COPYING README bin example test $ git add rack $ git commit -m 'added rack code' [master 0839fd8] added rack code 108 files changed, 10334 insertions(+), 0 dele create mode 100644 rack/AUTHORS create mode 100644 rack/COPYING ... create mode 100644 rack/test/testrequest.rb
  • 274. $ git read-tree --prefix=rack/ -u rack_branch $ ls README rack rack_app.rb $ ls rack AUTHORS KNOWN-ISSUES Rakefile contrib lib COPYING README bin example test $ git add rack $ git commit -m 'added rack code' [master 0839fd8] added rack code 108 files changed, 10334 insertions(+), 0 dele create mode 100644 rack/AUTHORS create mode 100644 rack/COPYING ... create mode 100644 rack/test/testrequest.rb
  • 275. $ git read-tree --prefix=rack/ -u rack_branch $ ls README rack rack_app.rb $ ls rack AUTHORS KNOWN-ISSUES Rakefile contrib lib COPYING README bin example test $ git add rack $ git commit -m 'added rack code' [master 0839fd8] added rack code 108 files changed, 10334 insertions(+), 0 dele create mode 100644 rack/AUTHORS create mode 100644 rack/COPYING ... create mode 100644 rack/test/testrequest.rb
  • 276. $ git read-tree --prefix=rack/ -u rack_branch $ ls README rack rack_app.rb $ ls rack AUTHORS KNOWN-ISSUES Rakefile contrib lib COPYING README bin example test $ git add rack $ git commit -m 'added rack code' [master 0839fd8] added rack code 108 files changed, 10334 insertions(+), 0 dele create mode 100644 rack/AUTHORS create mode 100644 rack/COPYING ... create mode 100644 rack/test/testrequest.rb
  • 277. $ git read-tree --prefix=rack/ -u rack_branch $ ls README rack rack_app.rb $ ls rack AUTHORS KNOWN-ISSUES Rakefile contrib lib COPYING README bin example test $ git add rack $ git commit -m 'added rack code' [master 0839fd8] added rack code 108 files changed, 10334 insertions(+), 0 dele create mode 100644 rack/AUTHORS create mode 100644 rack/COPYING ... create mode 100644 rack/test/testrequest.rb
  • 278. edit a file in rack
  • 279. $ vim rack/lib/rack.rb $ git commit -am 'added awesome to rack' [master b1b77ee] added awesome to rack 1 files changed, 1 insertions(+), 0 deletions(-) $ git checkout rack_branch $ git merge --squash -s subtree --no-commit master Squash commit -- not updating HEAD Automatic merge went well; stopped before committin $ git status # On branch rack_branch # Changes to be committed: # (use quot;git reset HEAD <file>...quot; to unstage) # # modified: lib/rack.rb #
  • 280. $ vim rack/lib/rack.rb $ git commit -am 'added awesome to rack' [master b1b77ee] added awesome to rack 1 files changed, 1 insertions(+), 0 deletions(-) $ git checkout rack_branch $ git merge --squash -s subtree --no-commit master Squash commit -- not updating HEAD Automatic merge went well; stopped before committin $ git status # On branch rack_branch # Changes to be committed: # (use quot;git reset HEAD <file>...quot; to unstage) # # modified: lib/rack.rb #
  • 281. $ vim rack/lib/rack.rb $ git commit -am 'added awesome to rack' [master b1b77ee] added awesome to rack 1 files changed, 1 insertions(+), 0 deletions(-) $ git checkout rack_branch $ git merge --squash -s subtree --no-commit master Squash commit -- not updating HEAD Automatic merge went well; stopped before committin $ git status # On branch rack_branch # Changes to be committed: # (use quot;git reset HEAD <file>...quot; to unstage) # # modified: lib/rack.rb #
  • 282. submit the change back to rack
  • 283. $ vim rack/lib/rack.rb $ git commit -am 'added awesome to rack' [master b1b77ee] added awesome to rack 1 files changed, 1 insertions(+), 0 deletions(-) $ git checkout rack_branch $ git merge --squash -s subtree --no-commit master Squash commit -- not updating HEAD Automatic merge went well; stopped before committin $ git status # On branch rack_branch # Changes to be committed: # (use quot;git reset HEAD <file>...quot; to unstage) # # modified: lib/rack.rb #
  • 284. git merge -s subtree
  • 285. $ vim rack/lib/rack.rb $ git commit -am 'added awesome to rack' [master b1b77ee] added awesome to rack 1 files changed, 1 insertions(+), 0 deletions(-) $ git checkout rack_branch $ git merge -s subtree --no-commit --squash master Squash commit -- not updating HEAD Automatic merge went well; stopped before committin $ git status # On branch rack_branch # Changes to be committed: # (use quot;git reset HEAD <file>...quot; to unstage) # # modified: lib/rack.rb #
  • 286. $ vim rack/lib/rack.rb $ git commit -am 'added awesome to rack' [master b1b77ee] added awesome to rack 1 files changed, 1 insertions(+), 0 deletions(-) $ git checkout rack_branch $ git merge -s subtree --no-commit --squash master Squash commit -- not updating HEAD Automatic merge went well; stopped before committin $ git status # On branch rack_branch # Changes to be committed: # (use quot;git reset HEAD <file>...quot; to unstage) # # modified: lib/rack.rb #
  • 287. $ vim rack/lib/rack.rb $ git commit -am 'added awesome to rack' [master b1b77ee] added awesome to rack 1 files changed, 1 insertions(+), 0 deletions(-) $ git checkout rack_branch $ git merge -s subtree --no-commit --squash master Squash commit -- not updating HEAD Automatic merge went well; stopped before committin $ git status # On branch rack_branch # Changes to be committed: # (use quot;git reset HEAD <file>...quot; to unstage) # # modified: lib/rack.rb #
  • 288. $ vim rack/lib/rack.rb $ git commit -am 'added awesome to rack' [master b1b77ee] added awesome to rack 1 files changed, 1 insertions(+), 0 deletions(-) $ git checkout rack_branch $ git merge -s subtree --no-commit --squash master Squash commit -- not updating HEAD Automatic merge went well; stopped before committin $ git status # On branch rack_branch # Changes to be committed: # (use quot;git reset HEAD <file>...quot; to unstage) # # modified: lib/rack.rb #
  • 289. $ vim rack/lib/rack.rb $ git commit -am 'added awesome to rack' [master b1b77ee] added awesome to rack 1 files changed, 1 insertions(+), 0 deletions(-) $ git checkout rack_branch $ git merge -s subtree --no-commit --squash master Squash commit -- not updating HEAD Automatic merge went well; stopped before committin $ git status # On branch rack_branch # Changes to be committed: # (use quot;git reset HEAD <file>...quot; to unstage) # # modified: lib/rack.rb #
  • 290. $ vim rack/lib/rack.rb $ git commit -am 'added awesome to rack' [master b1b77ee] added awesome to rack 1 files changed, 1 insertions(+), 0 deletions(-) $ git checkout rack_branch $ git merge -s subtree --no-commit --squash master Squash commit -- not updating HEAD Automatic merge went well; stopped before committin $ git status # On branch rack_branch # Changes to be committed: # (use quot;git reset HEAD <file>...quot; to unstage) # # modified: lib/rack.rb #
  • 291. $ vim rack/lib/rack.rb $ git commit -am 'added awesome to rack' [master b1b77ee] added awesome to rack 1 files changed, 1 insertions(+), 0 deletions(-) $ git checkout rack_branch $ git merge -s subtree --no-commit --squash master Squash commit -- not updating HEAD Automatic merge went well; stopped before committin $ git status # On branch rack_branch # Changes to be committed: # (use quot;git reset HEAD <file>...quot; to unstage) # # modified: lib/rack.rb #
  • 292. $ vim rack/lib/rack.rb $ git commit -am 'added awesome to rack' [master b1b77ee] added awesome to rack 1 files changed, 1 insertions(+), 0 deletions(-) $ git checkout rack_branch $ git merge -s subtree --no-commit --squash master Squash commit -- not updating HEAD Automatic merge went well; stopped before committin $ git status # On branch rack_branch # Changes to be committed: # (use quot;git reset HEAD <file>...quot; to unstage) # # modified: lib/rack.rb #
  • 293. $ vim rack/lib/rack.rb $ git commit -am 'added awesome to rack' [master b1b77ee] added awesome to rack 1 files changed, 1 insertions(+), 0 deletions(-) $ git checkout rack_branch $ git merge -s subtree --no-commit --squash master Squash commit -- not updating HEAD Automatic merge went well; stopped before committin $ git status # On branch rack_branch # Changes to be committed: # (use quot;git reset HEAD <file>...quot; to unstage) # # modified: lib/rack.rb #
  • 294. git merge -s subtree --no-commit --squash master
  • 295. git merge -s subtree --no-commit --squash master really?
  • 296. Tim Dysinger http://dysinger.net/2008/04/29/ replacing-braid-or-piston-for-git-with-40-lines-of-rake/
  • 297. Tim Dysinger http://dysinger.net/2008/04/29/ replacing-braid-or-piston-for-git-with-40-lines-of-rake/ http://tinyurl.com/braidgit
  • 300. $ git status # On branch master # Changed but not updated: # (use quot;git add <file>...quot; to update what wi # (use quot;git checkout -- <file>...quot; to discar # # modified: ticgit.gemspec # no changes added to commit (use quot;git addquot; and/
  • 301. $ git status # On branch master # Changed but not updated: # (use quot;git add <file>...quot; to update what wi # (use quot;git checkout -- <file>...quot; to discar # # modified: ticgit.gemspec # no changes added to commit (use quot;git addquot; and/
  • 302. $ git add -p diff --git a/ticgit.gemspec b/ticgit.gemspec index 9c32bd4..a44667b 100644 --- a/ticgit.gemspec +++ b/ticgit.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |s| s.platform = Gem::Platform::RUBY s.name = quot;ticgitquot; - s.version = quot;0.3.5quot; + s.version = quot;0.3.6quot; s.date = quot;2008-05-10quot; s.author = quot;Scott Chaconquot; s.email = quot;schacon@gmail.comquot; Stage this hunk [y,n,a,d,/,j,J,g,e,?]? y
  • 303. $ git add -p diff --git a/ticgit.gemspec b/ticgit.gemspec index 9c32bd4..a44667b 100644 --- a/ticgit.gemspec +++ b/ticgit.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |s| s.platform = Gem::Platform::RUBY s.name = quot;ticgitquot; - s.version = quot;0.3.5quot; + s.version = quot;0.3.6quot; s.date = quot;2008-05-10quot; s.author = quot;Scott Chaconquot; s.email = quot;schacon@gmail.comquot; Stage this hunk [y,n,a,d,/,j,J,g,e,?]? y
  • 304. $ git add -p diff --git a/ticgit.gemspec b/ticgit.gemspec index 9c32bd4..a44667b 100644 --- a/ticgit.gemspec +++ b/ticgit.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |s| s.platform = Gem::Platform::RUBY s.name = quot;ticgitquot; - s.version = quot;0.3.5quot; + s.version = quot;0.3.6quot; s.date = quot;2008-05-10quot; s.author = quot;Scott Chaconquot; s.email = quot;schacon@gmail.comquot; Stage this hunk [y,n,a,d,/,j,J,g,e,?]?
  • 305. $ git add -p diff --git a/ticgit.gemspec b/ticgit.gemspec index 9c32bd4..a44667b 100644 --- a/ticgit.gemspec +++ b/ticgit.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |s| s.platform = Gem::Platform::RUBY s.name = quot;ticgitquot; - s.version = quot;0.3.5quot; + s.version = quot;0.3.6quot; s.date = quot;2008-05-10quot; s.author = quot;Scott Chaconquot; s.email = quot;schacon@gmail.comquot; Stage this hunk [y,n,a,d,/,j,J,g,e,?]? y
  • 306. @@ -9,9 +9,10 @@ Gem::Specification.new do |s| s.files = [quot;lib/ticgit/base.rbquot;, quot;lib/ticgit/ quot;lib/ticgit/comment.rbquot;, quot;lib/ticgit/ticket.rbquot;, quot;lib/ ticgit.rbquot;, quot;bin/tiquot;, quot;bin/ticgitwebquot;] s.bindir = 'bin' - s.executables << quot;tiquot; - s.executables << quot;ticgitwebquot; + s.executables = [quot;tiquot;, quot;ticgitwebquot;] + s.default_executable = %q{ti} s.homepage = quot;http://github/schacon/ticgitquot; s.require_paths = [quot;libquot;, quot;binquot;] + s.specification_version = 2 if s.respond_to? :specification_version= end Stage this hunk [y,n,a,d,/,K,g,s,e,?]?
  • 307. @@ -9,9 +9,10 @@ Gem::Specification.new do |s| s.files = [quot;lib/ticgit/base.rbquot;, quot;lib/ticgit/ quot;lib/ticgit/comment.rbquot;, quot;lib/ticgit/ticket.rbquot;, quot;lib/ ticgit.rbquot;, quot;bin/tiquot;, quot;bin/ticgitwebquot;] s.bindir = 'bin' - s.executables << quot;tiquot; - s.executables << quot;ticgitwebquot; + s.executables = [quot;tiquot;, quot;ticgitwebquot;] + s.default_executable = %q{ti} s.homepage = quot;http://github/schacon/ticgitquot; s.require_paths = [quot;libquot;, quot;binquot;] + s.specification_version = 2 if s.respond_to? :specification_version= end Stage this hunk [y,n,a,d,/,K,g,s,e,?]?
  • 308. @@ -9,9 +9,10 @@ Gem::Specification.new do |s| s.files = [quot;lib/ticgit/base.rbquot;, quot;lib/ticgit/ quot;lib/ticgit/comment.rbquot;, quot;lib/ticgit/ticket.rbquot;, quot;lib/ ticgit.rbquot;, quot;bin/tiquot;, quot;bin/ticgitwebquot;] s.bindir = 'bin' - s.executables << quot;tiquot; - s.executables << quot;ticgitwebquot; + s.executables = [quot;tiquot;, quot;ticgitwebquot;] + s.default_executable = %q{ti} s.homepage = quot;http://github/schacon/ticgitquot; s.require_paths = [quot;libquot;, quot;binquot;] + s.specification_version = 2 if s.respond_to? :specification_version= end Stage this hunk [y,n,a,d,/,K,g,s,e,?]? n
  • 309. $ git status # On branch master # Changes to be committed: # (use quot;git reset HEAD <file>...quot; to unstage) # # modified: ticgit.gemspec # # Changed but not updated: # (use quot;git add <file>...quot; to update what will be com # (use quot;git checkout -- <file>...quot; to discard changes # # modified: ticgit.gemspec #
  • 310. $ git status # On branch master # Changes to be committed: # (use quot;git reset HEAD <file>...quot; to unstage) # # modified: ticgit.gemspec # # Changed but not updated: # (use quot;git add <file>...quot; to update what will be com # (use quot;git checkout -- <file>...quot; to discard changes # # modified: ticgit.gemspec #
  • 311. $ git status # On branch master # Changes to be committed: # (use quot;git reset HEAD <file>...quot; to unstage) # # modified: ticgit.gemspec # # Changed but not updated: # (use quot;git add <file>...quot; to update what will be com # (use quot;git checkout -- <file>...quot; to discard changes # # modified: ticgit.gemspec #
  • 312. $ git status # On branch master # Changes to be committed: # (use quot;git reset HEAD <file>...quot; to unstage) # # modified: ticgit.gemspec # # Changed but not updated: # (use quot;git add <file>...quot; to update what will be com # (use quot;git checkout -- <file>...quot; to discard changes # # modified: ticgit.gemspec #
  • 318. git blame ie: “what dumbass did this? oh, it was me...”
  • 319. git blame daemon.c 979e32fa (Randal L. Schwartz 2005-10-25 16:29:09 -0700 1) #include quot;cache.hquot; 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 2) #include quot;pkt-line.hquot; 77cb17e9 (Michal Ostrowski 2006-01-10 21:12:17 -0500 3) #include quot;exec_cmd.hquot; 49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 4) #include quot;interpolate.hquot; f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 5) 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 6) #include <syslog.h> 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 7) 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 8) #ifndef HOST_NAME_MAX 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 9) #define HOST_NAME_MAX 256 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 10) #endif 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 11) 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 12) #ifndef NI_MAXSERV 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 13) #define NI_MAXSERV 32 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 14) #endif 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 15) 9048fe1c (Petr Baudis 2005-09-24 16:13:01 +0200 16) static int log_syslog; f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 17) static int verbose; 1955fabf (Mark Wooding 2006-02-03 20:27:04 +0000 18) static int reuseaddr; f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 19) 960deccb (H. Peter Anvin 2005-10-19 14:27:01 -0700 20) static const char daemon_usage[] = 1b1dd23f (Stephan Beyer 2008-07-13 15:36:15 +0200 21) quot;git daemon [--verbose] [--syslog] [ 3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 22) quot; [--timeout=n] [--init-ti 3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 23) quot; [--strict-paths] [--base 73a7a656 (Jens Axboe 2007-07-27 14:00:29 -0700 24) quot; [--user-path | --user-pa 49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 25) quot; [--interpolated-path=pat 678dac6b (Tilman Sauerbeck 2006-08-22 19:37:41 +0200 26) quot; [--reuseaddr] [--detach] d9edcbd6 (Junio C Hamano 2006-09-07 01:40:04 -0700 27) quot; [--[enable|disable|allow dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 28) quot; [--inetd | [--listen=hos dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 29) quot; [--user=user dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 30) quot; [directory...]quot;; 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 31) 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 32) /* List of acceptable pathname prefi 96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 33) static char **ok_paths;
  • 320. git blame daemon.c 979e32fa (Randal L. Schwartz 2005-10-25 16:29:09 -0700 1) #include quot;cache.hquot; 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 2) #include quot;pkt-line.hquot; 77cb17e9 (Michal Ostrowski 2006-01-10 21:12:17 -0500 3) #include quot;exec_cmd.hquot; 49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 4) #include quot;interpolate.hquot; f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 5) 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 6) #include <syslog.h> 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 7) 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 8) #ifndef HOST_NAME_MAX 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 9) #define HOST_NAME_MAX 256 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 10) #endif 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 11) 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 12) #ifndef NI_MAXSERV 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 13) #define NI_MAXSERV 32 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 14) #endif 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 15) 9048fe1c (Petr Baudis 2005-09-24 16:13:01 +0200 16) static int log_syslog; f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 17) static int verbose; 1955fabf (Mark Wooding 2006-02-03 20:27:04 +0000 18) static int reuseaddr; f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 19) 960deccb (H. Peter Anvin 2005-10-19 14:27:01 -0700 20) static const char daemon_usage[] = 1b1dd23f (Stephan Beyer 2008-07-13 15:36:15 +0200 21) quot;git daemon [--verbose] [--syslog] [ 3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 22) quot; [--timeout=n] [--init-ti 3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 23) quot; [--strict-paths] [--base 73a7a656 (Jens Axboe 2007-07-27 14:00:29 -0700 24) quot; [--user-path | --user-pa 49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 25) quot; [--interpolated-path=pat 678dac6b (Tilman Sauerbeck 2006-08-22 19:37:41 +0200 26) quot; [--reuseaddr] [--detach] d9edcbd6 (Junio C Hamano 2006-09-07 01:40:04 -0700 27) quot; [--[enable|disable|allow dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 28) quot; [--inetd | [--listen=hos dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 29) quot; [--user=user dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 30) quot; [directory...]quot;; 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 31) 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 32) /* List of acceptable pathname prefi 96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 33) static char **ok_paths;
  • 321. git blame daemon.c 979e32fa (Randal L. Schwartz 2005-10-25 16:29:09 -0700 1) #include quot;cache.hquot; 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 2) #include quot;pkt-line.hquot; 77cb17e9 (Michal Ostrowski 2006-01-10 21:12:17 -0500 3) #include quot;exec_cmd.hquot; 49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 4) #include quot;interpolate.hquot; f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 5) 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 6) #include <syslog.h> 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 7) 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 8) #ifndef HOST_NAME_MAX 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 9) #define HOST_NAME_MAX 256 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 10) #endif 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 11) 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 12) #ifndef NI_MAXSERV 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 13) #define NI_MAXSERV 32 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 14) #endif 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 15) 9048fe1c (Petr Baudis 2005-09-24 16:13:01 +0200 16) static int log_syslog; f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 17) static int verbose; 1955fabf (Mark Wooding 2006-02-03 20:27:04 +0000 18) static int reuseaddr; f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 19) 960deccb (H. Peter Anvin 2005-10-19 14:27:01 -0700 20) static const char daemon_usage[] = 1b1dd23f (Stephan Beyer 2008-07-13 15:36:15 +0200 21) quot;git daemon [--verbose] [--syslog] [ 3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 22) quot; [--timeout=n] [--init-ti 3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 23) quot; [--strict-paths] [--base 73a7a656 (Jens Axboe 2007-07-27 14:00:29 -0700 24) quot; [--user-path | --user-pa 49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 25) quot; [--interpolated-path=pat 678dac6b (Tilman Sauerbeck 2006-08-22 19:37:41 +0200 26) quot; [--reuseaddr] [--detach] d9edcbd6 (Junio C Hamano 2006-09-07 01:40:04 -0700 27) quot; [--[enable|disable|allow dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 28) quot; [--inetd | [--listen=hos dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 29) quot; [--user=user dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 30) quot; [directory...]quot;; 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 31) 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 32) /* List of acceptable pathname prefi 96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 33) static char **ok_paths;
  • 322. git blame daemon.c 979e32fa (Randal L. Schwartz 2005-10-25 16:29:09 -0700 1) #include quot;cache.hquot; 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 2) #include quot;pkt-line.hquot; 77cb17e9 (Michal Ostrowski 2006-01-10 21:12:17 -0500 3) #include quot;exec_cmd.hquot; 49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 4) #include quot;interpolate.hquot; f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 5) 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 6) #include <syslog.h> 85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 7) 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 8) #ifndef HOST_NAME_MAX 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 9) #define HOST_NAME_MAX 256 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 10) #endif 695dffe2 (Johannes Schindelin 2006-09-28 12:00:35 +0200 11) 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 12) #ifndef NI_MAXSERV 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 13) #define NI_MAXSERV 32 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 14) #endif 415e7b87 (Patrick Welche 2007-10-18 18:17:39 +0100 15) 9048fe1c (Petr Baudis 2005-09-24 16:13:01 +0200 16) static int log_syslog; f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 17) static int verbose; 1955fabf (Mark Wooding 2006-02-03 20:27:04 +0000 18) static int reuseaddr; f8ff0c06 (Petr Baudis 2005-09-22 11:25:28 +0200 19) 960deccb (H. Peter Anvin 2005-10-19 14:27:01 -0700 20) static const char daemon_usage[] = 1b1dd23f (Stephan Beyer 2008-07-13 15:36:15 +0200 21) quot;git daemon [--verbose] [--syslog] [ 3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 22) quot; [--timeout=n] [--init-ti 3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 23) quot; [--strict-paths] [--base 73a7a656 (Jens Axboe 2007-07-27 14:00:29 -0700 24) quot; [--user-path | --user-pa 49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 25) quot; [--interpolated-path=pat 678dac6b (Tilman Sauerbeck 2006-08-22 19:37:41 +0200 26) quot; [--reuseaddr] [--detach] d9edcbd6 (Junio C Hamano 2006-09-07 01:40:04 -0700 27) quot; [--[enable|disable|allow dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 28) quot; [--inetd | [--listen=hos dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 29) quot; [--user=user dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 30) quot; [directory...]quot;; 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 31) 4ae95682 (H. Peter Anvin 2005-09-26 19:10:55 -0700 32) /* List of acceptable pathname prefi 96f1e58f (David Rientjes 2006-08-15 10:23:48 -0700 33) static char **ok_paths;