SlideShare a Scribd company logo
Git 101
Scott Chacon
Introduction
Me
Scott Chacon
Git 101 tutorial presentation
git-scm.com
http://gitref.org
Git 101 tutorial presentation
http://progit.org
schacon@gmail.com
@chacon
twitter
</me>
What is Git?
“distributed version
control system”
what is version control?
what is version control?
what do we use it for?
imagine a world with no
version control tools
Git 101 tutorial presentation
what would you do?
downsides?
who doesn’t use version control?
who doesn’t use version control?
rhetorical question
what project is this?
• thousands of developers
• working all across the world
• used on millions of computers
• runs 90% of the supercomputers in the world
• runs my phone
•11 years with no version control system
• has an adorable mascot
Git 101 tutorial presentation
1991-2002
Git 101 tutorial presentation
Git 101 tutorial presentation
no version control
how did they do it?
main dude
main.c
library.c
library.h
main dude
main.c
library.c
library.h
ver-1.0.zip
main dude
main.c
library.c
library.h
ver-1.0.zip
you
main dude
main.c
library.c
library.h
ver-1.0.zip
you
main dude
main.c
library.c
library.h
ver-1.0.zip
you
v1/main.c
v1/library.c
v1/library.h
main dude
main.c
library.c
library.h
ver-1.0.zip
you
v1/main.c
v1/library.c
v1/library.h
cp -Rf v1 patch
main dude
main.c
library.c
library.h
ver-1.0.zip
you
v1/main.c
v1/library.c
v1/library.h
cp -Rf v1 patch
patch/main.c
patch/library.c
patch/library.h
main dude
main.c
library.c
library.h
ver-1.0.zip
you
v1/main.c
v1/library.c
v1/library.h
cp -Rf v1 patch
patch/main.c
patch/library.c
patch/library.h
main dude
main.c
library.c
library.h
ver-1.0.zip
you
v1/main.c
v1/library.c
v1/library.h
cp -Rf v1 patch
patch/main.c
patch/library.c*
patch/library.h
diff -u v1 patch
main dude
main.c
library.c
library.h
ver-1.0.zip
you
v1/main.c
v1/library.c
v1/library.h
cp -Rf v1 patch
patch/main.c
patch/library.c*
patch/library.h
diff -u v1 patch
$ git diff v1 patch
diff --git a/v1/library.c b/patch/library.c
index 0be4b5f..0120580 100644
--- a/v1/library.c
+++ b/patch/library.c
@@ -19,7 +19,7 @@ static struct {
{ "detachedhead", &advice_detached_head },
};
-int git_default_config(const char *var, const char *value)
+int YO_MOMMA_IS_FAT(const char *var, const char *value)
{
const char *k = skip_prefix(var, "advice.");
int i;
main dude
main.c
library.c
library.h
ver-1.0.zip
you
v1/main.c
v1/library.c
v1/library.h
cp -Rf v1 patch
patch/main.c
patch/library.c*
patch/library.h
diff -u v1 patch
email
main dude
main.c
library.c
library.h
you
v1/main.c
v1/library.c
v1/library.h
cp -Rf v1 patch
patch/main.c
patch/library.c*
patch/library.h
diff -u v1 patch
ver-1.0.zip
ver-1.1.zip
ver-1.0.zip
ver-1.1.zip
ver-1.2.zip
now imagine...
main dude
main.c
library.c
library.h
V1
main dude
main.c
library.c
library.h
you
V1
main.c
library.c
library.h
V1
main dude
main.c
library.c
library.h
you
V1
main.c
library.c
library.h
V1
main.c
library.c*
library.h
V2
main dude
main.c
library.c
library.h
you
V1
main.c*
library.c
library.h
V3
main.c
library.c
library.h
V1
main.c
library.c*
library.h
V2
main dude
main.c
library.c
library.h
you
V1
main.c*
library.c
library.h
V3
main.c
library.c
library.h
V1
main.c
library.c*
library.h
V2
main.c
library.c*
library.h
V2
main dude
main.c
library.c
library.h
you
V1
main.c*
library.c
library.h
V3
main.c
library.c
library.h
V1
main.c
library.c*
library.h
V2
main.c
library.c*
library.h
V2
main.c*
library.c*
library.h
V4
main dude
main.c
library.c
library.h
you
V1
main.c*
library.c
library.h
V3
main.c
library.c
library.h
V1
main.c
library.c*
library.h
V2
main.c
library.c*
library.h
V2
main.c*
library.c*
library.h
V4
main dude
main.c
library.c
library.h
you
V1
main.c*
library.c
library.h
V3
main.c
library.c
library.h
V1
main.c
library.c*
library.h
V2
main.c
library.c*
library.h
V2
main.c*
library.c*
library.h
V4
main dude
main.c
library.c
library.h
you
V1
main.c*
library.c
library.h
V3
main.c
library.c
library.h
V1
main.c
library.c*
library.h
V2
main.c
library.c*
library.h
V2
main.c*
library.c*
library.h
V4
Snapshots, not Patches
delta
storage
 


    

 
  



    












snapshot
storage
delta
storage
 


    

 
  



    












snapshot
storage
delta
storage
 


    

 
  



    












snapshot
storage
delta
storage
 


    

 
  



    












snapshot
storage
delta
storage
 


    

 
  



    












snapshot
storage
delta
storage
 


    

 
  



    












snapshot
storage
delta
storage
 


    

 
  



    












snapshot
storage
delta
storage
 


    

 
  



    












snapshot
storage
delta
storage
 


    

 
  



    












snapshot
storage
delta
storage
 


    

 
  



    












snapshot
storage
delta
storage
 


    

 
  



    












snapshot
storage
delta
storage
 


    

 
  



    












snapshot
storage
delta
storage
 


    

 
  



    












snapshot
storage
delta
storage
 


    

 
  



    












snapshot
storage
delta
storage
 


    

 
  



    












snapshot
storage
Git 101 tutorial presentation
Basic Git
First Steps
$ git config --global user.name “Scott Chacon”
$ git config --global user.email “schacon@gmail.com”
Getting a Repo
Create One
git init
$ touch hello_world.rb
$ git init
$ git add .
$ git commit -m ‘first commit’
$ touch hello_world.rb
$ git init
$ git add .
$ git commit -m ‘first commit’
$ tree -a
.
|-- .git
| |-- HEAD
| |-- branches
| |-- config
| |-- description
| |-- hooks
| | |-- post-commit.sample
| | |-- post-receive.sample
| | |-- ...
| | |-- pre-rebase.sample
| | `-- update.sample
| |-- info
| | `-- exclude
| |-- objects
| | |-- info
| | `-- pack
| |-- refs
| | |-- heads
| | `-- tags
| `-- remotes
`-- hello_world.rb
11 directories, 25 files
$ tree -a
.
|-- .git
| |-- HEAD
| |-- branches
| |-- config
| |-- description
| |-- hooks
| | |-- post-commit.sample
| | |-- post-receive.sample
| | |-- ...
| | |-- pre-rebase.sample
| | `-- update.sample
| |-- info
| | `-- exclude
| |-- objects
| | |-- info
| | `-- pack
| |-- refs
| | |-- heads
| | `-- tags
| `-- remotes
`-- hello_world.rb
11 directories, 25 files
$ tree -a
.
|-- .git
| |-- HEAD
| |-- branches
| |-- config
| |-- description
| |-- hooks
| | |-- post-commit.sample
| | |-- post-receive.sample
| | |-- ...
| | |-- pre-rebase.sample
| | `-- update.sample
| |-- info
| | `-- exclude
| |-- objects
| | |-- info
| | `-- pack
| |-- refs
| | |-- heads
| | `-- tags
| `-- remotes
`-- hello_world.rb
11 directories, 25 files
$ touch hello_world.rb
$ git init
$ git add .
$ git commit -m ‘first commit’
$ touch hello_world.rb
$ git init
$ git add .
$ git commit -m ‘first commit’
$ tree -a
.
|-- .git
| |-- COMMIT_EDITMSG
| |-- HEAD
| |-- branches
| |-- config
| |-- description
| |-- hooks
| | |-- applypatch-msg.sample
| | `-- update.sample
| |-- index
| |-- info
| | `-- exclude
| |-- logs
| | |-- HEAD
| | `-- refs
| | `-- heads
| | `-- master
| |-- objects
| | |-- 32/09658ac8d80bc9726d3a33d77e3dfc5fe6035e
| | |-- 53/9cd7886a627841d525a78d45cbc6396be20b41
| | |-- e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391
| | |-- info
| | `-- pack
| |-- refs
| | |-- heads
| | | `-- master
| | `-- tags
| `-- remotes
`-- hello_world.rb
17 directories, 33 files
$ tree -a
.
|-- .git
| |-- COMMIT_EDITMSG
| |-- HEAD
| |-- branches
| |-- config
| |-- description
| |-- hooks
| | |-- applypatch-msg.sample
| | `-- update.sample
| |-- index
| |-- info
| | `-- exclude
| |-- logs
| | |-- HEAD
| | `-- refs
| | `-- heads
| | `-- master
| |-- objects
| | |-- 32/09658ac8d80bc9726d3a33d77e3dfc5fe6035e
| | |-- 53/9cd7886a627841d525a78d45cbc6396be20b41
| | |-- e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391
| | |-- info
| | `-- pack
| |-- refs
| | |-- heads
| | | `-- master
| | `-- tags
| `-- remotes
`-- hello_world.rb
17 directories, 33 files
$ tree -a
.
|-- .git
| |-- COMMIT_EDITMSG
| |-- HEAD
| |-- branches
| |-- config
| |-- description
| |-- hooks
| | |-- applypatch-msg.sample
| | `-- update.sample
| |-- index
| |-- info
| | `-- exclude
| |-- logs
| | |-- HEAD
| | `-- refs
| | `-- heads
| | `-- master
| |-- objects
| | |-- 32/09658ac8d80bc9726d3a33d77e3dfc5fe6035e
| | |-- 53/9cd7886a627841d525a78d45cbc6396be20b41
| | |-- e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391
| | |-- info
| | `-- pack
| |-- refs
| | |-- heads
| | | `-- master
| | `-- tags
| `-- remotes
`-- hello_world.rb
17 directories, 33 files
Clone One
git clone
$ git clone git://github.com/schacon/ticgit.git
Initialized empty Git repository in /private/tmp/ticgit/.git/
remote: Counting objects: 591, done.
remote: Compressing objects: 100% (267/267), done.
remote: Total 591 (delta 253), reused 587 (delta 252)
Receiving objects: 100% (591/591), 73.05 KiB, done.
Resolving deltas: 100% (253/253), done.
$ cd ticgit/
$ ls
LICENSE! ! Rakefile! examples! note! ! ticgit.gemspec
README!! bin!! lib!! spec
$
$ git clone git://github.com/schacon/ticgit.git
Initialized empty Git repository in /private/tmp/ticgit/.git/
remote: Counting objects: 591, done.
remote: Compressing objects: 100% (267/267), done.
remote: Total 591 (delta 253), reused 587 (delta 252)
Receiving objects: 100% (591/591), 73.05 KiB, done.
Resolving deltas: 100% (253/253), done.
$ cd ticgit/
$ ls
LICENSE! ! Rakefile! examples! note! ! ticgit.gemspec
README!! bin!! lib!! spec
$
$ git clone git://github.com/schacon/ticgit.git
Initialized empty Git repository in /private/tmp/ticgit/.git/
remote: Counting objects: 591, done.
remote: Compressing objects: 100% (267/267), done.
remote: Total 591 (delta 253), reused 587 (delta 252)
Receiving objects: 100% (591/591), 73.05 KiB, done.
Resolving deltas: 100% (253/253), done.
$ cd ticgit/
$ ls
LICENSE! ! Rakefile! examples! note! ! ticgit.gemspec
README!! bin!! lib!! spec
$
$ git clone git://github.com/schacon/ticgit.git
Initialized empty Git repository in /private/tmp/ticgit/.git/
remote: Counting objects: 591, done.
remote: Compressing objects: 100% (267/267), done.
remote: Total 591 (delta 253), reused 587 (delta 252)
Receiving objects: 100% (591/591), 73.05 KiB, done.
Resolving deltas: 100% (253/253), done.
$ cd ticgit/
$ ls
.git LICENSE! ! Rakefile! examples! note! !
ticgit.gemspec README!! bin!! lib!! spec
$
A Basic Workflow
A Basic Workflow
Edit files
Stage the changes
Review your changes
Commit the changes
working directory
repository
index
git add
git commit
working directory
repository
index
git add
git commit
a working copy
of your project
working directory
repository
index
git add
git commit
object database
working directory
repository
index
git add
git commit
“staging”
A Basic Workflow
Edit files
Stage the changes
Review your changes
Commit the changes
$ find .
./app.yaml
./index.yaml
./main.py
#!/usr/bin/env python
import wsgiref.handlers
from google.appengine.ext import webapp
class MainHandler(webapp.RequestHandler):
def get(self):
self.response.out.write('Hello world!')
def main():
application = webapp.WSGIApplication([('/', MainHandler)],
debug=True)
wsgiref.handlers.CGIHandler().run(application)
if __name__ == '__main__':
main()
~
~
"main.py" 16L, 402C
$ vim main.py
#!/usr/bin/env python
import wsgiref.handlers
from google.appengine.ext import webapp
# this program prints out ‘hello world’
class MainHandler(webapp.RequestHandler):
def get(self):
self.response.out.write('Hello world!')
def main():
application = webapp.WSGIApplication([('/', MainHandler)],
debug=True)
wsgiref.handlers.CGIHandler().run(application)
if __name__ == '__main__':
main()
~
~
"main.py" 16L, 402C
$ vim main.py
$ git status
$ git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what
#
#	modified: main.py
#
no changes added to commit (use "git add" an
$ git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what
#
#	modified: main.py
#
no changes added to commit (use "git add" an
$ git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what
#
#	modified: main.py
#
no changes added to commit (use "git add" an
$ git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what
#
#	modified: main.py
#
no changes added to commit (use "git add" an
STAGED
A Basic Workflow
Edit files
Stage the changes
Review your changes
Commit the changes
git add
working directory
repository
index
git add
git commit
working directory
repository
index
git add
git commit
$ git add main.py
$ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>.
#
#	modified: main.py
#
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>.
#
#	modified: main.py
#
$ git add main.py
$ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>.
#
#	modified: main.py
#
$ git add main.py
$ git status
THAT ARE STAGED
$ vim app.yaml
application: chacon
version: 1
runtime: python
api_version: 1
handlers:
- url: .*
script: main.py
~
~
~
"app.yaml" 8L, 101C
application: chacon
version: 1
runtime: python
api_version: 1
handlers:
- url: .*
script: main.py
~
~
~
"app.yaml" 8L, 101C
$ vim app.yaml
application: chacon
version: 2
runtime: python
api_version: 1
handlers:
- url: .*
script: main.py
~
~
~
"app.yaml" 8L, 101C
$ vim app.yaml
$ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
#	 modified: main.py
#
# Changed but not updated:
# (use "git add <file>..." to update what will be com
#
#	 modified: app.yaml
#
$ vim main.py
#!/usr/bin/env python
import wsgiref.handlers
from google.appengine.ext import webapp
# this program prints out ‘hello world’
class MainHandler(webapp.RequestHandler):
def get(self):
self.response.out.write('Hello world!')
def main():
application = webapp.WSGIApplication([('/', MainHandler)],
debug=True)
wsgiref.handlers.CGIHandler().run(application)
if __name__ == '__main__':
main()
~
~
"main.py" 16L, 402C
#!/usr/bin/env python
import wsgiref.handlers
from google.appengine.ext import webapp
# this program prints out ‘hello world’
class MainHandler(webapp.RequestHandler):
def get(self):
self.response.out.write('Hola world!')
def main():
application = webapp.WSGIApplication([('/', MainHandler)],
debug=True)
wsgiref.handlers.CGIHandler().run(application)
if __name__ == '__main__':
main()
~
~
"main.py" 16L, 402C
$ vim main.py
#!/usr/bin/env python
import wsgiref.handlers
from google.appengine.ext import webapp
# this program prints out ‘hello world’
class MainHandler(webapp.RequestHandler):
def get(self):
self.response.out.write('Hola Mundo!')
def main():
application = webapp.WSGIApplication([('/', MainHandler)],
debug=True)
wsgiref.handlers.CGIHandler().run(application)
if __name__ == '__main__':
main()
~
~
"main.py" 16L, 402C
$ vim main.py
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
#	 modified: main.py
#
# Changed but not updated:
# (use "git add <file>..." to update what will be com
#
#	 modified: app.yaml
#	 modified: main.py
#
$ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
#	 modified: main.py
#
# Changed but not updated:
# (use "git add <file>..." to update what will be com
#
#	 modified: app.yaml
#	 modified: main.py
#
$ git status
Staged
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
#	 modified: main.py
#
# Changed but not updated:
# (use "git add <file>..." to update what will be com
#
#	 modified: app.yaml
#	 modified: main.py
#
$ git status
Unstaged
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
#	 modified: main.py
#
# Changed but not updated:
# (use "git add <file>..." to update what will be com
#
#	 modified: app.yaml
#	 modified: main.py
#
$ git status
#!/usr/bin/env python
import wsgiref.handlers
from google.appengine.ext import webapp
# this program prints out ‘hello world’
class MainHandler(webapp.RequestHandler):
def get(self):
self.response.out.write('Hola Mundo!')
def main():
application = webapp.WSGIApplication
([('/'
debug=True)
wsgiref.handlers.CGIHandler().run
(applicat
if __name__ == '__main__':
main()
#!/usr/bin/env python
import wsgiref.handlers
from google.appengine.ext import webapp
# this program prints out ‘hello world’
class MainHandler(webapp.RequestHandler):
def get(self):
self.response.out.write('Hello World!')
def main():
application = webapp.WSGIApplication
([('/'
debug=True)
wsgiref.handlers.CGIHandler().run
(applicat
if __name__ == '__main__':
main()
Staged In Working Directory
#!/usr/bin/env python
import wsgiref.handlers
from google.appengine.ext import webapp
# this program prints out ‘hello world’
class MainHandler(webapp.RequestHandler):
def get(self):
self.response.out.write('Hola Mundo!')
def main():
application = webapp.WSGIApplication
([('/'
debug=True)
wsgiref.handlers.CGIHandler().run
(applicat
if __name__ == '__main__':
main()
#!/usr/bin/env python
import wsgiref.handlers
from google.appengine.ext import webapp
# this program prints out ‘hello world’
class MainHandler(webapp.RequestHandler):
def get(self):
self.response.out.write('Hello World!')
def main():
application = webapp.WSGIApplication
([('/'
debug=True)
wsgiref.handlers.CGIHandler().run
(applicat
if __name__ == '__main__':
main()
Staged In Working Directory
You have to stage a file
after you edit it
You have to stage a file
after you edit it
You have to stage a file
after you edit it
$ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
#	 modified: app.yaml
#	 modified: main.py
#
$ git add app.yaml main.py
A Basic Workflow
Edit files
Stage the changes
Review your changes
Commit the changes
git commit
working directory
repository
index
git add
git commit
working directory
repository
index
git add
git commit
$ git commit
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: app.yaml
# modified: main.py
#
~
~
~
~
".git/COMMIT_EDITMSG" 10L, 279C
descriptive commit message
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: app.yaml
# modified: main.py
#
~
~
~
~
".git/COMMIT_EDITMSG" 10L, 279C
$ git commit
descriptive commit message
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: app.yaml
# modified: main.py
#
~
~
~
~
".git/COMMIT_EDITMSG" 10L, 279C
$ git commit
$ git commit
Created commit 77d3001: descriptive commit message
2 files changed, 4 insertions(+), 2 deletions(-)
A Basic Workflow
Edit files
Stage the changes
Review your changes
Commit the changes
vim / emacs / etc
git add (file)
repo status
git commit
A Basic Workflow
Edit files
Stage the changes
Review your changes
Commit the changes
vim / emacs / etc
git add (file)
repo status
git commit
A Basic Workflow
Edit files
Stage the changes
Review your changes
Commit the changes
vim / emacs / etc
git add (file)
repo status
git commit
A Basic Workflow
Edit files
Stage the changes
Review your changes
Commit the changes
vim / emacs / etc
git add (file)
git status
git commit
A Basic Workflow
Edit files
Stage the changes
Review your changes
Commit the changes
vim / emacs / etc
git add (file)
git status
git commit
A Basicer Workflow
Edit files
Stage and Commit
vim / emacs / etc
git commit -a
What’s going on here?
$ git commit
Created commit 77d3001: descriptive commit message
2 files changed, 4 insertions(+), 2 deletions(-)
$ git commit
Created commit 77d3001: descriptive commit message
2 files changed, 4 insertions(+), 2 deletions(-)
77d3001
77d3001a1de6bf8f5e431972fe4d25b01e595c0b
77d3001a1de6bf8f5e431972fe4d25b01e595c0b
77d3001a1de6bf8f5e431972fe4d25b01e595c0b
commit size
ae668..
tree
parent
author
committer
my commit message goes here
and it is really, really cool
c4ec5
a149e
Scott
Scott
77d3001a1de6bf8f5e431972fe4d25b01e595c0b
commit size
ae668..
tree
parent
author
committer
my commit message goes here
and it is really, really cool
c4ec5
a149e
Scott
Scott
tree c4ec543b0322744e55c5efc9b6c4e449d398dbff
parent a149e2160b3f7573768cdc2fce24d0881f3577e1
author Scott Chacon <schacon@gmail.com> 1223402504 -0700
committer Scott Chacon <schacon@gmail.com> 1223402504 -0700
descriptive commit message
77d3001a1de6bf8f5e431972fe4d25b01e595c0b
commit size
ae668..
tree
parent
author
committer
my commit message goes here
and it is really, really cool
c4ec5
a149e
Scott
Scott
77d3001a1de6bf8f5e431972fe4d25b01e595c0b
commit size
ae668..
tree
parent
author
committer
my commit message goes here
and it is really, really cool
c4ec5
a149e
Scott
Scott
app.yaml
index.yaml
main.py
./ c4e
03e
1d3
3d5
commit size
ae668..
tree
parent
author
committer
my commit message goes here
and it is really, really cool
c4ec5
a149e
Scott
Scott
app.yaml
index.yaml
main.py
./ c4e
03e
1d3
3d5
commit size
tree
parent
author
committer
this is the previous commit
and I am very proud of it
2de54
38def
Scott
Scott
commit size
ae668..
tree
parent
author
committer
my commit message goes here
and it is really, really cool
c4ec5
a149e
Scott
Scott
app.yaml
index.yaml
main.py
./ c4e
03e
1d3
3d5
commit size
tree
parent
author
committer
this is the previous commit
and I am very proud of it
2de54
38def
Scott
Scott
app.yaml
index.yaml
main.py
./ c4e
03e
1d3
3d5
commit size
ae668..
tree
parent
author
committer
my commit message goes here
and it is really, really cool
c4ec5
a149e
Scott
Scott
app.yaml
index.yaml
main.py
./ c4e
03e
1d3
3d5
commit size
tree
parent
author
committer
this is the previous commit
and I am very proud of it
2de54
38def
Scott
Scott
commit size
tree
parent
author
committer
this is the commit before that
and I'm not sure why
2fe65
90ecd
Scott
Scott
app.yaml
index.yaml
main.py
./ c4e
03e
1d3
3d5
app.yaml
index.yaml
main.py
./ c4e
03e
1d3
3d5
commit size
tree
parent
author
committer
this is the commit before that
and I'm not sure why
2fe65
90ecd
Scott
Scott
app.yaml
index.yaml
main.py
./ c4e
03e
1d3
3d5
commit size
ae668..
tree
parent
author
committer
my commit message goes here
and it is really, really cool
c4ec5
a149e
Scott
Scott
app.yaml
index.yaml
main.py
./ c4e
03e
1d3
3d5
commit size
tree
parent
author
committer
this is the previous commit
and I am very proud of it
2de54
38def
Scott
Scott
commit size
tree
parent
author
committer
this is the commit before that
and I'm not sure why
2fe65
90ecd
Scott
Scott
app.yaml
index.yaml
main.py
./ c4e
03e
1d3
3d5
app.yaml
index.yaml
main.py
./ c4e
03e
1d3
3d5
commit size
tree
parent
author
committer
this is the commit before that
and I'm not sure why
2fe65
90ecd
Scott
Scott
app.yaml
index.yaml
main.py
./ c4e
03e
1d3
3d5
48e 77da1438d
c4e
3d5
1d3
03e
f46
23f
30e
67e
32a
5b1
Repository
3d4
03e
ae6
5b1
1d3
c36
f46
23f
6fe
30e
67e
32a
ffe
38d
5b1
1d3
254
a14
d23
2d3
48e
735
de3
c4ec4e
77d
3d5
Repository
3d4
03e
ae6
5b1
1d3
c36
f46
23f
6fe
30e
67e
32a
ffe
38d
5b1
1d3
254
a14
d23
2d3
48e
735
de3
c4ec4e
77d
3d5
git checkout ae635
Repository
3d4
03e
ae6
5b1
1d3
c36
f46
23f
6fe
30e
67e
32a
ffe
38d
5b1
1d3
254
a14
d23
2d3
48e
735
de3
c4ec4e
77d
3d5
git checkout ae635
Working DirectoryIndex
Rakefile
README
simplegit.rb
./
lib/
./Rakefile
./README
./lib/simplegit.rb
./
./lib/ c36
3d4
03e
5b1
1d3
Repository
3d4
03e
ae6
5b1
1d3
c36
f46
23f
6fe
30e
67e
32a
ffe
38d
5b1
1d3
254
a14
d23
2d3
48e
735
de3
c4ec4e
77d
3d5
Repository
3d4
03e
ae6
5b1
1d3
c36
f46
23f
6fe
30e
67e
32a
ffe
38d
5b1
1d3
254
a14
d23
2d3
48e
735
de3
c4ec4e
77d
3d5
Working DirectoryIndex
Rakefile
README
simplegit.rb
./
lib/
./Rakefile
./README
./lib/simplegit.rb
./
./lib/ c36
3d4
03e
5b1
1d3
Repository
3d4
03e
ae6
5b1
1d3
c36
f46
23f
6fe
30e
67e
32a
ffe
38d
5b1
1d3
254
a14
d23
2d3
48e
735
de3
c4ec4e
77d
3d5
Working DirectoryIndex
Rakefile
README
simplegit.rb
./
lib/
./Rakefile
./README
./lib/simplegit.rb
./
./lib/ c36
3d4
03e
5b1
1d3
Repository
3d4
03e
ae6
5b1
1d3
c36
f46
23f
6fe
30e
67e
32a
ffe
38d
5b1
1d3
254
a14
d23
2d3
48e
735
de3
c4ec4e
77d
3d5
Working DirectoryIndex
Rakefile
README
simplegit.rb
./
lib/
./Rakefile
./README
./lib/simplegit.rb
./
./lib/ c36
3d4
03e
5b1
1d3
Repository
3d4
03e
ae6
5b1
1d3
c36
f46
23f
6fe
30e
67e
32a
ffe
38d
5b1
1d3
254
a14
d23
2d3
48e
735
de3
c4ec4e
77d
3d5
Working DirectoryIndex
Rakefile
README
simplegit.rb
./
lib/
./Rakefile
./README
./lib/simplegit.rb
./
./lib/ c36
3d4
03e
5b1
1d3
git add
Repository
3d4
03e
ae6
5b1
1d3
c36
f46
23f
6fe
30e
67e
32a
ffe
38d
5b1
1d3
254
a14
d23
2d3
48e
735
de3
c4ec4e
77d
3d5
Working DirectoryIndex
Rakefile
README
simplegit.rb
./
lib/
./Rakefile
./README
./lib/simplegit.rb
./
./lib/ c36
3d4
03e
5b1
1d3
git add
34f
Repository
3d4
03e
ae6
5b1
1d3
c36
f46
23f
6fe
30e
67e
32a
ffe
38d
5b1
1d3
254
a14
d23
2d3
48e
735
de3
c4ec4e
77d
3d5
Working DirectoryIndex
Rakefile
README
simplegit.rb
./
lib/
./Rakefile
./README
./lib/simplegit.rb
./
./lib/ c36
3d4
03e
5b1
1d3
git commit
34f
a083da34f
ae9
Repository
3d4
03e
ae6
5b1
1d3
c36
f46
23f
6fe
30e
67e
32a
ffe
38d
5b1
1d3
254
a14
d23
2d3
48e
735
de3
c4ec4e
77d
3d5
Working DirectoryIndex
Rakefile
README
simplegit.rb
./
lib/
./Rakefile
./README
./lib/simplegit.rb
./
./lib/ c36
3d4
03e
5b1
1d334f
a083da34f
ae9
Repository
3d4
03e
ae6
5b1
1d3
c36
f46
23f
6fe
30e
67e
32a
ffe
38d
5b1
1d3
254
a14
d23
2d3
48e
735
de3
c4ec4e
77d
3d5
Working DirectoryIndex
Rakefile
README
simplegit.rb
./
lib/
./Rakefile
./README
./lib/simplegit.rb
./
./lib/ c36
3d4
03e
5b1
1d334f
a083da34f
ae9
object model
blob
commit
tree
C1
}directory list
file contents
pointer to a
snapshot
object model
blob
commit
tree
C1
}directory list
file contents
pointer to a
snapshot
ref
commit commitcommit
tree
treeblob
tree
treeblob
tree
treeblob
blob
Bulk Staging
working directory
repository
index
working directory
repository
index
git add
working directory
repository
index
git add
git add
git add
working directory
repository
index
git add
git commit
git add -u
git commit -a
working directory
repository
git commit -aindex
git commit -a
git add -u
git commit
Patch Staging
git add -p
$ git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what wi
# (use "git checkout -- <file>..." to discar
#
#	modified: ticgit.gemspec
#
no changes added to commit (use "git add" and/
$ git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what wi
# (use "git checkout -- <file>..." to discar
#
#	modified: ticgit.gemspec
#
no changes added to commit (use "git add" 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 = "ticgit"
- s.version = "0.3.5"
+ s.version = "0.3.6"
s.date = "2008-05-10"
s.author = "Scott Chacon"
s.email = "schacon@gmail.com"
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 = "ticgit"
- s.version = "0.3.5"
+ s.version = "0.3.6"
s.date = "2008-05-10"
s.author = "Scott Chacon"
s.email = "schacon@gmail.com"
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 = "ticgit"
- s.version = "0.3.5"
+ s.version = "0.3.6"
s.date = "2008-05-10"
s.author = "Scott Chacon"
s.email = "schacon@gmail.com"
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 = "ticgit"
- s.version = "0.3.5"
+ s.version = "0.3.6"
s.date = "2008-05-10"
s.author = "Scott Chacon"
s.email = "schacon@gmail.com"
Stage this hunk [y,n,a,d,/,j,J,g,e,?]? y
@@ -9,9 +9,10 @@ Gem::Specification.new do |s|
s.files = ["lib/ticgit/base.rb", "lib/ticgit/
"lib/ticgit/comment.rb", "lib/ticgit/ticket.rb", "lib/
ticgit.rb", "bin/ti", "bin/ticgitweb"]
s.bindir = 'bin'
- s.executables << "ti"
- s.executables << "ticgitweb"
+ s.executables = ["ti", "ticgitweb"]
+ s.default_executable = %q{ti}
s.homepage = "http://github/schacon/ticgit"
s.require_paths = ["lib", "bin"]
+ 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 = ["lib/ticgit/base.rb", "lib/ticgit/
"lib/ticgit/comment.rb", "lib/ticgit/ticket.rb", "lib/
ticgit.rb", "bin/ti", "bin/ticgitweb"]
s.bindir = 'bin'
- s.executables << "ti"
- s.executables << "ticgitweb"
+ s.executables = ["ti", "ticgitweb"]
+ s.default_executable = %q{ti}
s.homepage = "http://github/schacon/ticgit"
s.require_paths = ["lib", "bin"]
+ 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 = ["lib/ticgit/base.rb", "lib/ticgit/
"lib/ticgit/comment.rb", "lib/ticgit/ticket.rb", "lib/
ticgit.rb", "bin/ti", "bin/ticgitweb"]
s.bindir = 'bin'
- s.executables << "ti"
- s.executables << "ticgitweb"
+ s.executables = ["ti", "ticgitweb"]
+ s.default_executable = %q{ti}
s.homepage = "http://github/schacon/ticgit"
s.require_paths = ["lib", "bin"]
+ 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 "git reset HEAD <file>..." to unstage)
#
#	 modified: ticgit.gemspec
#
# Changed but not updated:
# (use "git add <file>..." to update what will be com
# (use "git checkout -- <file>..." to discard changes
#
#	 modified: ticgit.gemspec
#
$ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
#	 modified: ticgit.gemspec
#
# Changed but not updated:
# (use "git add <file>..." to update what will be com
# (use "git checkout -- <file>..." to discard changes
#
#	 modified: ticgit.gemspec
#
$ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
#	 modified: ticgit.gemspec
#
# Changed but not updated:
# (use "git add <file>..." to update what will be com
# (use "git checkout -- <file>..." to discard changes
#
#	 modified: ticgit.gemspec
#
$ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
#	 modified: ticgit.gemspec
#
# Changed but not updated:
# (use "git add <file>..." to update what will be com
# (use "git checkout -- <file>..." to discard changes
#
#	 modified: ticgit.gemspec
#
partially stage files
git add -p
Changes
delta
storage
 


    

 
  



    












snapshot
storage
delta
storage
 


    

 
  



    












snapshot
storage
delta
storage
 


    

 
  



    












snapshot
storage
git diff
Git 101 tutorial presentation
What is not yet staged?
git diff
git diff
working directory
repository
index
What is staged?
git diff --cached
git diff --cached
working directory
repository
index
git diff --stat
$ git diff --stat
kidgloves.rb | 2 +-
1 files changed, 1 insertions(+),
1 deletions(-)
Unified Diff
git diff > change.patch
git diff > change.patch
patch -p1 < change.patch
git diff > change.patch
patch -p1 < change.patch
git apply change.patch
or
History
git log
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Branching and Merging
branches
branches
lightweight, movable
pointers to a commit
C1
branch
branching
git branch
git checkout
C1
master
C0
C2 C3
experiment
HEAD
default
C1
master
C0
C2 C3
experiment
C3
C4
experiment
C5
git branch experiment
HEAD
default
C1
master
C0
C2 C3
experiment
C3
C4
experiment
C5
git branch experiment
HEAD
default
C1
master
C0
C2 C3
experiment
C3
C4
experiment
C5
HEAD
$ git branch
* default
experiment
default
C1
master
C0
C2 C3
experiment
C3
C4
experiment
C5
HEAD
$ git branch
* default
experiment
default
C1
master
C0
C2 C3
experiment
C3
C4
experiment
C5
git checkout experiment
HEAD
default
C1
master
C0
C2 C3
experiment
master
2 C3
C4
experiment
C5
T1
git commit
HEAD
default
C1
master
C0
C2 C3
experiment
master
2 C3
C4
experiment
C5
T1
git commit
HEAD
default
C1
master
C0
C2 C3
experiment
master
2 C3
C4
experiment
C5
T1
git commit
HEAD
default
C1
master
C0
C2 C3
experiment
C1
master
C2 C3
C4
experiment
C5
T1
git commit
git commit
HEAD
default
C1
master
C0
C2 C3
experiment
C1
master
C2 C3
C4
experiment
C5
T1
HEAD
git checkout defaultdefault
C1
master
C0
C2 C3
experiment
C1
master
C2 C3
C4
experiment
C5
T1
HEAD
git checkout defaultdefault
C1
master
C0
C2 C3
C4
experiment
C5
T1
C1
master
C2 C3
C4
experiment
C5
T1git commit
HEAD
default
C1
master
C0
C2 C3
C4
experiment
C5
T1
C1
master
C2 C3
C4
experiment
C5
T1git commit
HEAD
default
C1
master
C0
C2 C3
C4
experiment
C5
T1
C1
master
C2 C3
C4
experiment
C5
T1git commit
HEAD
default
C1
master
C0
C2 C3
C4
experiment
C5
T1
git checkout experiment
git commit
HEAD
default
what is a branch, really?
$ find .git/refs
.git/refs
.git/refs/heads
.git/refs/heads/default
.git/refs/heads/experiment
$ find .git/refs
.git/refs
.git/refs/heads
.git/refs/heads/default
.git/refs/heads/experiment
$ find .git/refs
.git/refs
.git/refs/heads
.git/refs/heads/default
.git/refs/heads/experiment
$ find .git/refs
.git/refs
.git/refs/heads
.git/refs/heads/default
.git/refs/heads/experiment
$ cat .git/refs/heads/default
6370409dc9e38af91565082bdf93577ff555489e
$ find .git/refs
.git/refs
.git/refs/heads
.git/refs/heads/default
.git/refs/heads/experiment
$ cat .git/refs/heads/default
6370409dc9e38af91565082bdf93577ff555489e
$ cat .git/refs/heads/experiment
33ce13c2f0ed35775956f81191b01a644448dcfc
$ cat .git/HEAD
ref: refs/heads/experiment
$ cat .git/HEAD
ref: refs/heads/experiment
$ cat .git/HEAD
ref: refs/heads/experiment
merging
git merge
C1
master
C0
C2 C3
C4
experiment
C5
T1
HEAD
default
C1
master
C0
C2 C3
C4
experiment
C5
T1
HEAD
git checkout default
default
C1C0
C2 C3
C4
experiment
C5
C6
masterT1
git checkout default
git merge experiment
HEAD
default
C1C0
C2 C3
C4
experiment
C5
C6
masterT1
git checkout default
git merge experiment
HEAD
default
C1C0
C2 C3
C4
C5
C6
C7
C8
default
experiment
HEADgit checkout experiment
C1C0
C2 C3
C4
C5
C6
C7
C8
default
experiment
HEADgit commit
C1C0
C2 C3
C4
C5
C6
C7
C8
default
experiment
HEAD
git checkout default
C1C0
C2 C3
C4
C5
C6
C7
C8
default
experiment
HEAD
git merge experiment
Why is this cool?
try out an idea
isolate work units
long running topics
visualizing your
branches
git log --graph
git log --oneline --graph
gitk
gitk 6d13f..41aba
git log --all
Deleting Branches
git branch -d branch
git branch -D branch
Stashing
when a commit is
too much
$ git status
# On branch iss53
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working
directory)
#
#	 modified: src/com/android/alarmclock/AlarmAlert.java
#	 modified: src/com/android/alarmclock/AlarmAlertWakeLock.java
#
no changes added to commit (use "git add" and/or "git commit -a")
$ git stash
Saved working directory and index state "WIP on iss53: c8208f9...
Merge branch 'cupcake'"
HEAD is now at c8208f9 Merge branch 'cupcake'
(To restore them type "git stash apply")
$ git status
# On branch iss53
nothing to commit (working directory clean)
$ git status
# On branch iss53
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working
directory)
#
#	 modified: src/com/android/alarmclock/AlarmAlert.java
#	 modified: src/com/android/alarmclock/AlarmAlertWakeLock.java
#
no changes added to commit (use "git add" and/or "git commit -a")
$ git stash
Saved working directory and index state "WIP on iss53: c8208f9...
Merge branch 'cupcake'"
HEAD is now at c8208f9 Merge branch 'cupcake'
(To restore them type "git stash apply")
$ git status
# On branch iss53
nothing to commit (working directory clean)
$ git status
# On branch iss53
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working
directory)
#
#	 modified: src/com/android/alarmclock/AlarmAlert.java
#	 modified: src/com/android/alarmclock/AlarmAlertWakeLock.java
#
no changes added to commit (use "git add" and/or "git commit -a")
$ git stash
Saved working directory and index state "WIP on iss53: c8208f9...
Merge branch 'cupcake'"
HEAD is now at c8208f9 Merge branch 'cupcake'
(To restore them type "git stash apply")
$ git status
# On branch iss53
nothing to commit (working directory clean)
$ git status
# On branch iss53
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working
directory)
#
#	 modified: src/com/android/alarmclock/AlarmAlert.java
#	 modified: src/com/android/alarmclock/AlarmAlertWakeLock.java
#
no changes added to commit (use "git add" and/or "git commit -a")
$ git stash
Saved working directory and index state "WIP on iss53: c8208f9...
Merge branch 'cupcake'"
HEAD is now at c8208f9 Merge branch 'cupcake'
(To restore them type "git stash apply")
$ git status
# On branch iss53
nothing to commit (working directory clean)
$ git status
# On branch iss53
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working
directory)
#
#	 modified: src/com/android/alarmclock/AlarmAlert.java
#	 modified: src/com/android/alarmclock/AlarmAlertWakeLock.java
#
no changes added to commit (use "git add" and/or "git commit -a")
$ git stash
Saved working directory and index state "WIP on iss53: c8208f9...
Merge branch 'cupcake'"
HEAD is now at c8208f9 Merge branch 'cupcake'
(To restore them type "git stash apply")
$ git status
# On branch iss53
nothing to commit (working directory clean)
$ git status
# On branch iss53
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working
directory)
#
#	 modified: src/com/android/alarmclock/AlarmAlert.java
#	 modified: src/com/android/alarmclock/AlarmAlertWakeLock.java
#
no changes added to commit (use "git add" and/or "git commit -a")
$ git stash
Saved working directory and index state "WIP on iss53: c8208f9...
Merge branch 'cupcake'"
HEAD is now at c8208f9 Merge branch 'cupcake'
(To restore them type "git stash apply")
$ git status
# On branch iss53
nothing to commit (working directory clean)
$ git status
# On branch iss53
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working
directory)
#
#	 modified: src/com/android/alarmclock/AlarmAlert.java
#	 modified: src/com/android/alarmclock/AlarmAlertWakeLock.java
#
no changes added to commit (use "git add" and/or "git commit -a")
$ git stash
Saved working directory and index state "WIP on iss53: c8208f9...
Merge branch 'cupcake'"
HEAD is now at c8208f9 Merge branch 'cupcake'
(To restore them type "git stash apply")
$ git status
# On branch iss53
nothing to commit (working directory clean)
$ git status
# On branch iss53
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working
directory)
#
#	 modified: src/com/android/alarmclock/AlarmAlert.java
#	 modified: src/com/android/alarmclock/AlarmAlertWakeLock.java
#
no changes added to commit (use "git add" and/or "git commit -a")
$ git stash
Saved working directory and index state "WIP on iss53: c8208f9...
Merge branch 'cupcake'"
HEAD is now at c8208f9 Merge branch 'cupcake'
(To restore them type "git stash apply")
$ git status
# On branch iss53
nothing to commit (working directory clean)
$ git status
# On branch iss53
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working
directory)
#
#	 modified: src/com/android/alarmclock/AlarmAlert.java
#	 modified: src/com/android/alarmclock/AlarmAlertWakeLock.java
#
no changes added to commit (use "git add" and/or "git commit -a")
$ git stash
Saved working directory and index state "WIP on iss53: c8208f9...
Merge branch 'cupcake'"
HEAD is now at c8208f9 Merge branch 'cupcake'
(To restore them type "git stash apply")
$ git status
# On branch iss53
nothing to commit (working directory clean)
$ git stash list
stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake'
$ git stash apply
# On branch iss53
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working
directory)
#
#	 modified: src/com/android/alarmclock/AlarmAlert.java
#	 modified: src/com/android/alarmclock/AlarmAlertWakeLock.java
#
no changes added to commit (use "git add" and/or "git commit -a")
$ git stash list
stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake'
$ git stash drop stash@{0}
Dropped stash@{0} (e19b0e94032d0614f450238f91953fe5e7e454a8)
$ git stash list
stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake'
$ git stash apply
# On branch iss53
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working
directory)
#
#	 modified: src/com/android/alarmclock/AlarmAlert.java
#	 modified: src/com/android/alarmclock/AlarmAlertWakeLock.java
#
no changes added to commit (use "git add" and/or "git commit -a")
$ git stash list
stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake'
$ git stash drop stash@{0}
Dropped stash@{0} (e19b0e94032d0614f450238f91953fe5e7e454a8)
$ git stash list
stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake'
$ git stash apply
# On branch iss53
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working
directory)
#
#	 modified: src/com/android/alarmclock/AlarmAlert.java
#	 modified: src/com/android/alarmclock/AlarmAlertWakeLock.java
#
no changes added to commit (use "git add" and/or "git commit -a")
$ git stash list
stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake'
$ git stash drop stash@{0}
Dropped stash@{0} (e19b0e94032d0614f450238f91953fe5e7e454a8)
$ git stash list
stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake'
$ git stash apply
# On branch iss53
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working
directory)
#
#	 modified: src/com/android/alarmclock/AlarmAlert.java
#	 modified: src/com/android/alarmclock/AlarmAlertWakeLock.java
#
no changes added to commit (use "git add" and/or "git commit -a")
$ git stash list
stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake'
$ git stash drop stash@{0}
Dropped stash@{0} (e19b0e94032d0614f450238f91953fe5e7e454a8)
$ git stash list
stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake'
$ git stash apply
# On branch iss53
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working
directory)
#
#	 modified: src/com/android/alarmclock/AlarmAlert.java
#	 modified: src/com/android/alarmclock/AlarmAlertWakeLock.java
#
no changes added to commit (use "git add" and/or "git commit -a")
$ git stash list
stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake'
$ git stash drop stash@{0}
Dropped stash@{0} (e19b0e94032d0614f450238f91953fe5e7e454a8)
$ git stash list
stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake'
$ git stash apply
# On branch iss53
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working
directory)
#
#	 modified: src/com/android/alarmclock/AlarmAlert.java
#	 modified: src/com/android/alarmclock/AlarmAlertWakeLock.java
#
no changes added to commit (use "git add" and/or "git commit -a")
$ git stash list
stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake'
$ git stash drop stash@{0}
Dropped stash@{0} (e19b0e94032d0614f450238f91953fe5e7e454a8)
$ git stash list
stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake'
$ git stash apply
# On branch iss53
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working
directory)
#
#	 modified: src/com/android/alarmclock/AlarmAlert.java
#	 modified: src/com/android/alarmclock/AlarmAlertWakeLock.java
#
no changes added to commit (use "git add" and/or "git commit -a")
$ git stash list
stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake'
$ git stash drop stash@{0}
Dropped stash@{0} (e19b0e94032d0614f450238f91953fe5e7e454a8)
$ git stash list
stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake'
$ git stash apply
# On branch iss53
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working
directory)
#
#	 modified: src/com/android/alarmclock/AlarmAlert.java
#	 modified: src/com/android/alarmclock/AlarmAlertWakeLock.java
#
no changes added to commit (use "git add" and/or "git commit -a")
$ git stash list
stash@{0}: WIP on iss53: c8208f9... Merge branch 'cupcake'
$ git stash drop stash@{0}
Dropped stash@{0} (e19b0e94032d0614f450238f91953fe5e7e454a8)
git stash branch new_branch stash@{1}
git stash
save
list
drop
pop
apply
branch
Remotes
sharing git
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
git clone git://github.com/schacon/simplegit2.git
distributed workflow
distributed workflow
fetch, pull and push
fetch
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
pull
pull = fetch + merge
push
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
git push
Git 101 tutorial presentation
git push origin branchA:branchB
a who in the what now?
public repo
local repo
local repo
public repo
internet
A B C
public repo
local repo
local repo
public repo
git push
(ssh)
internet
A B C
A B C
public repo
local repo
local repo
public repo
git push
(ssh)
git fetch
(git)
internet
A B C
A B C
A B C
public repo
local repo
local repo
public repo
git push
(ssh)
git fetch
(git)
internet
A B C
A B C
A B C
D E F git commit
public repo
local repo
local repo
public repo
git push
(ssh)
git fetch
(git)
git push
(ssh)
internet
A B C
A B C
A B C
D E F
A B C
D E F
public repo
local repo
local repo
public repo
git fetch
(http)
git push
(ssh)
git fetch
(git)
git push
(ssh)
internet
A B C
A B C
A B C
D E F
A B C
D E F
D E F
public repo
local repo
local repo
public repo
git fetch
(http)
git push
(ssh)
git fetch
(git)
git push
(ssh)
internet
A B C
A B C
A B C
D E F
A B C
D E F
D E FD E F
multiple remotes
developer
nick
developer
jessica
my repo
5ec
e4a
4a7ce0 master
developer
nick
developer
jessica
my repo
5ec
e4a
4a7ce0 master
commit
developer
nick
developer
jessica
my repo
5ec
e4a
4a7ce0 master
tree
developer
nick
developer
jessica
my repo
5ec
e4a
4a7ce0 master
blobs
schacon/
project
developer
nick
developer
jessica
"public"
my repo
5ec
e4a
4a7ce0 master
git push public
public/master
5ec
e4a
4a7ce0
schacon/
project
developer
jessica
"public"
my repo
5ec
e4a
4a7ce0 master
git clone (url)
public/master
5ec
e4a
4a7ce0
5ec
e4a
4a7ce0
developer
nick
schacon/
project
developer
jessica
"public"
my repo
5ec
e4a
4a7ce0 master
git commit
public/master
5ec
e4a
4a7ce0
5ec
e4a
4a7ce0
developer
nick
c12ec524f
schacon/
project
"public"
my repo
5ec
e4a
4a7ce0 master
public/master
5ec
e4a
4a7ce0
5ec
e4a
4a7ce0
developer
nick
c12ec524f git clone (url)
5ec
e4a
4a7ce0
developer
jessica
schacon/
project
"public"
my repo
5ec
e4a
4a7ce0 master
public/master
5ec
e4a
4a7ce0
5ec
e4a
4a7ce0
developer
nick
c12ec524f
5ec
e4a
4a7ce0
developer
jessica
2fbdf74ea
a09
git commit
schacon/
project
"public"
my repo
5ec
e4a
4a7ce0 master
public/master
5ec
e4a
4a7ce0
5ec
e4a
4a7ce0
developer
nick
c12ec524f
5ec
e4a
4a7ce0
developer
jessica
2fbdf74ea
a09
git push
5ec
e4a
4a7ce0
nickh/
project
c12ec524f
5ec
e4a
4a7ce0
jessica/
project
2fbdf74ea
a09
schacon/
project
"public"
my repo
5ec
e4a
4a7ce0 master
public/master
5ec
e4a
4a7ce0
5ec
e4a
4a7ce0
developer
nick
c12ec524f
5ec
e4a
4a7ce0
developer
jessica
2fbdf74ea
a09
git remote add nick git://github.com/nickh/project.git
5ec
e4a
4a7ce0
nickh/
project
c12ec524f
5ec
e4a
4a7ce0
jessica/
project
2fbdf74ea
a09"nick"
git remote add nick git://github.com/nickh/project.git
schacon/
project
"public"
my repo
5ec
e4a
4a7ce0 master
public/master
5ec
e4a
4a7ce0
5ec
e4a
4a7ce0
developer
nick
c12ec524f
5ec
e4a
4a7ce0
developer
jessica
2fbdf74ea
a09
git remote add nick git://github.com/nickh/project.git
5ec
e4a
4a7ce0
nickh/
project
c12ec524f
5ec
e4a
4a7ce0
jessica/
project
2fbdf74ea
a09"nick"“nick”
git remote add nick git://github.com/nickh/project.git
schacon/
project
"public"
my repo
5ec
e4a
4a7ce0 master
public/master
5ec
e4a
4a7ce0
5ec
e4a
4a7ce0
developer
nick
c12ec524f
5ec
e4a
4a7ce0
developer
jessica
2fbdf74ea
a09
git remote add jess git://github.com/jessica/project.git
5ec
e4a
4a7ce0
nickh/
project
c12ec524f
5ec
e4a
4a7ce0
jessica/
project
2fbdf74ea
a09"nick" "jess"
git remote add jess git://github.com/jessica/project.git
schacon/
project
"public"
my repo
5ec
e4a
4a7ce0 master
public/master
5ec
e4a
4a7ce0
5ec
e4a
4a7ce0
developer
nick
c12ec524f
5ec
e4a
4a7ce0
developer
jessica
2fbdf74ea
a09
git remote add jess git://github.com/jessica/project.git
5ec
e4a
4a7ce0
nickh/
project
c12ec524f
5ec
e4a
4a7ce0
jessica/
project
2fbdf74ea
a09"nick" "jess"
git remote add jess git://github.com/jessica/project.git
“jess”
schacon/
project
"public"
my repo
5ec
e4a
4a7ce0 master
public/master
5ec
e4a
4a7ce0
5ec
e4a
4a7ce0
developer
nick
c12ec524f
5ec
e4a
4a7ce0
developer
jessica
2fbdf74ea
a09
git remote add jess git://github.com/jessica/project.git
5ec
e4a
4a7ce0
nickh/
project
c12ec524f
5ec
e4a
4a7ce0
jessica/
project
2fbdf74ea
a09"nick" "jess"
schacon/
project
"public"
my repo
5ec
e4a
4a7ce0 master
public/master
5ec
e4a
4a7ce0
git fetch nick
5ec
c12
5ec
e4a
4a7ce0
jessica/
project
2fbdf74ea
a09"jess"
c12ec524f nick/master
git fetch nick
schacon/
project
"public"
my repo
5ec
e4a
4a7ce0 master
public/master
5ec
e4a
4a7ce0
5ec
e4a
4a7ce0
developer
nick
c12ec524f
5ec
e4a
4a7ce0
developer
jessica
2fbdf74ea
a09
git fetch nick
5ec
e4a
4a7ce0
nickh/
project
c12ec524f
5ec
e4a
4a7ce0
jessica/
project
2fbdf74ea
a09"nick" "jess"
c12ec524f nick/master
schacon/
project
"public"
my repo
5ec
e4a
4a7ce0 master
public/master
5ec
e4a
4a7ce0
5ec
e4a
4a7ce0
developer
nick
c12ec524f
5ec
e4a
4a7ce0
developer
jessica
2fbdf74ea
a09
git remote add jess git://github.com/jessica/project.git
5ec
e4a
4a7ce0
nickh/
project
c12ec524f
5ec
e4a
4a7ce0
jessica/
project
2fbdf74ea
a09"nick" "jess"
git fetch jess
schacon/
project
"public"
my repo
5ec
e4a
4a7ce0 master
public/
e4a
git fetch jess
e4a
nickh/
project
c12ec524f
jessic
proje
"nick" "jess
ec524f nick/ma
2fbdf74ea
a09
jess/ma
c12
schacon/
project
"public"
my repo
5ec
e4a
4a7ce0 master
public/master
5ec
e4a
4a7ce0
5ec
e4a
4a7ce0
developer
nick
c12ec524f
5ec
e4a
4a7ce0
developer
jessica
2fbdf74ea
a09
git fetch nick
5ec
e4a
4a7ce0
nickh/
project
c12ec524f
5ec
e4a
4a7ce0
jessica/
project
2fbdf74ea
a09"nick" "jess"
c12ec524f nick/master
schacon/
project
"public"
my repo
5ec
e4a
4a7ce0 master
public/master
5ec
e4a
4a7ce0
5ec
e4a
4a7ce0
developer
nick
c12ec524f
5ec
e4a
4a7ce0
developer
jessica
2fbdf74ea
a09
git fetch jess
5ec
e4a
4a7ce0
nickh/
project
c12ec524f
5ec
e4a
4a7ce0
jessica/
project
2fbdf74ea
a09"nick" "jess"
ec524f nick/master
2fbdf74ea
a09
jess/master
c12
schacon/
project
"public"
my repo
5ec
e4a
4a7ce0
master
public/master
5ec
e4a
4a7ce0
5ec
e4a
4a7ce0
developer
nick
c12ec524f
5ec
e4a
4a7ce0
developer
jessica
2fbdf74ea
a09
5ec
e4a
4a7ce0
nickh/
project
c12ec524f
5ec
e4a
4a7ce0
jessica/
project
2fbdf74ea
a09"nick" "jess"
ec524f nick/master
2fbdf74ea
a09
jess/master
c12
b3bc63
git merge nick jessgit merge nick/master jess/master
schacon/
project
"public"
my repo
5ec
e4a
4a7ce0
master
public/master
5ec
e4a
4a7ce0
5ec
e4a
4a7ce0
developer
nick
c12ec524f
5ec
e4a
4a7ce0
developer
jessica
2fbdf74ea
a09
git push public
5ec
e4a
4a7ce0
nickh/
project
c12ec524f
5ec
e4a
4a7ce0
jessica/
project
2fbdf74ea
a09"nick" "jess"
ec524f nick/master
2fbdf74ea
a09
jess/master
c12
b3bc63
e4a
ec524f
2fbdf74ea
a09
c12
b3bc63
schacon/
project
"public"
my repo
5ec
e4a
4a7ce0
master
public/master
5ec
e4a
4a7ce0
5ec
e4a
4a7ce0
developer
nick
c12ec524f
5ec
e4a
4a7ce0
developer
jessica
2fbdf74ea
a09
5ec
e4a
4a7ce0
nickh/
project
c12ec524f
5ec
e4a
4a7ce0
jessica/
project
2fbdf74ea
a09"nick" "jess"
ec524f nick/master
2fbdf74ea
a09
jess/master
c12
b3bc63
e4a
ec524f
2fbdf74ea
a09
c12
b3bc63
schacon/
project
"public"
my repo
5ec
e4a
4a7ce0
master
public/master
5ec
e4a
4a7ce0
5ec
e4a
4a7ce0
developer
nick
c12ec524f
5ec
e4a
4a7ce0
developer
jessica
2fbdf74ea
a09
5ec
e4a
4a7ce0
nickh/
project
c12ec524f
5ec
e4a
4a7ce0
jessica/
project
2fbdf74ea
a09"nick" "jess"
ec524f nick/master
2fbdf74ea
a09
jess/master
c12
b3bc63
e4a
ec524f
2fbdf74ea
a09
c12
b3bc63
schacon/
project
"public"
my repo
5ec
e4a
4a7ce0
master
public/master
5ec
e4a
4a7ce0
5ec
e4a
4a7ce0
developer
nick
c12ec524f
5ec
e4a
4a7ce0
developer
jessica
2fbdf74ea
a09
5ec
e4a
4a7ce0
nickh/
project
c12ec524f
5ec
e4a
4a7ce0
jessica/
project
2fbdf74ea
a09"nick" "jess"
ec524f nick/master
2fbdf74ea
a09
jess/master
c12
b3bc63
e4a
ec524f
2fbdf74ea
a09
c12
b3bc63
schacon/
project
"public"
my repo
5ec
e4a
4a7ce0
master
public/master
5ec
e4a
4a7ce0
5ec
e4a
4a7ce0
developer
nick
c12ec524f
5ec
e4a
4a7ce0
developer
jessica
2fbdf74ea
a09
5ec
e4a
4a7ce0
nickh/
project
c12ec524f
5ec
e4a
4a7ce0
jessica/
project
2fbdf74ea
a09"nick" "jess"
ec524f nick/master
2fbdf74ea
a09
jess/master
c12
b3bc63
e4a
ec524f
2fbdf74ea
a09
c12
b3bc63
Remotes Are Branches
C0
default
scott jessica
C1
C0
default
scott jessica
C1
C0
scott/default default
C1
C0
default
scott jessica
C1
C0
scott/default default
C1
git clone
C0
default
scott jessica
C1
C0
scott/default default
C1
C0
default
scott jessica
C1
C0
scott/default default
C1
C0
default
scott jessica
C1 C1
C0
scott/default
default
C2
C3
C4
C0
default
scott jessica
C1 C1
C0
scott/default
default
C2
C3
C4
C0
default
scott jessica
C1 C1
C0
scott/default
default
C2
C3
C4
C0
default
scott
C1
C5
C6
C7
jessica
C1
C0
scott/default
default
C2
C3
C4
C0
default
scott
C1
C5
C6
C7
jessica
C1
C0
scott/default
default
C2
C3
C4
C0
default
scott jessica
C1
C0
scott/default default
C2
C3
C4
C1
C5
C6
C7
C5
C6
C7
C0
default
scott jessica
C1
C0
scott/default default
C2
C3
C4
C1
C5
C6
C7
C5
C6
C7
experiment
C8
C9
C0
default
scott jessica
C1
C0
scott/default default
C2
C3
C4
C1
C5
C6
C7
C5
C6
C7
experiment
C8
C9
C0
default
scott jessica
C1
C0
scott/default default
C2
C3
C4
C1
C5
C6
C7
C5
C6
C7
experiment
C8
C9
git merge experiment
git merge scott/default
C0
default
scott jessica
C1
C0
scott/default default
C2
C3
C4
C1
C5
C6
C7
C5
C6
C7
experiment
C8
C9
C0
default
scott jessica
C1
C0
scott/default default
C2
C3
C4
C1
C5
C6
C7
C5
C6
C7
experiment
C8
C9
a “remote” branch is simply a
local pointer to the last known
state of another repository
Tagging
lightweight tags
Snapshot A Snapshot B Snapshot C
98ca9 34ac2 f30ab
master
HEAD
git tag v1.0
Snapshot A Snapshot B Snapshot C
98ca9 34ac2 f30ab
master
HEAD
v1.0
Snapshot A Snapshot B Snapshot C
98ca9 34ac2 f30ab
master
HEAD
v1.0
Snapshot D
a38d3
annotated tags
git tag -a v1.1 34ac2
tag size
49e11..
object
type
tagger
my tag message that explains
this tag
ae668
commit
Scott
tag v1.3
Snapshot A Snapshot B Snapshot C
98ca9 34ac2 f30ab
master
HEAD
v1.0
Snapshot D
a38d3
tag data
v1.1
tagging objects
git hash-object -w file.txt
$ git hash-object -w ~/README.txt
35a0dd3af166e09ac378dfeb95953923e71ea45b
$ git tag -a my_readme 35a0dd3af166e09ac378dfe
$ git show my_readme
tag my_readme
Tagger: Scott Chacon <schacon@gmail.com>
Date: Tue Mar 16 08:36:24 2010 -0700
my readme
My README File
by Scott Chacon
$ git hash-object -w ~/README.txt
35a0dd3af166e09ac378dfeb95953923e71ea45b
$ git tag -a my_readme 35a0dd3af166e09ac378dfe
$ git show my_readme
tag my_readme
Tagger: Scott Chacon <schacon@gmail.com>
Date: Tue Mar 16 08:36:24 2010 -0700
my readme
My README File
by Scott Chacon
$ git hash-object -w ~/README.txt
35a0dd3af166e09ac378dfeb95953923e71ea45b
$ git tag -a my_readme 35a0dd3af166e09ac378dfe
$ git show my_readme
tag my_readme
Tagger: Scott Chacon <schacon@gmail.com>
Date: Tue Mar 16 08:36:24 2010 -0700
my readme
My README File
by Scott Chacon
sharing tags
git push --tags
Git Inspection
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’
ce0e4
master
5ec47 2f45e 4eadf 2fbb3 18cae
b3be1 a09c6 df2fa c36ae
jess/master
ce0e4
master
5ec47 2f45e 4eadf 2fbb3 18cae
b3be1 a09c6 df2fa c36ae
jess/master
master^
ce0e4
master
5ec47 2f45e 4eadf 2fbb3 18cae
b3be1 a09c6 df2fa c36ae
jess/master
master^2
Tilde Spec
default~2
grandparent of ‘default’
(parent of the parent)
ce0e4
master
5ec47 2f45e 4eadf 2fbb3 18cae
b3be1 a09c6 df2fa c36ae
jess/master
master~2
ce0e4
master
5ec47 2f45e 4eadf 2fbb3 18cae
b3be1 a09c6 df2fa c36ae
jess/master
master^^^2
master~2^2
ce0e4
master
5ec47 2f45e 4eadf 2fbb3 18cae
b3be1 a09c6 df2fa c36ae
jess/master
master^^^2
master~2^2
ce0e4
master
5ec47 2f45e 4eadf 2fbb3 18cae
b3be1 a09c6 df2fa c36ae
jess/master
master^^^2
master~2^2
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
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
ce0e4
master
5ec47 2f45e 4eadf 2fbb3 18cae
b3be1 a09c6 df2fa c36ae
jess/master
jess/master..master
ce0e4
master
5ec47 2f45e 4eadf 2fbb3 18cae
b3be1 a09c6 df2fa c36ae
jess/master
jess/master..master
jess/master..master
ce0e4
master
5ec47 2f45e 4eadf 2fbb3 18cae
b3be1 a09c6 df2fa c36ae
jess/master
ce0e4
master
5ec47 2f45e 4eadf 2fbb3 18cae
b3be1 a09c6 df2fa c36ae
jess/master
jess/master..master
ce0e4
master
5ec47 2f45e 4eadf 2fbb3 18cae
b3be1 a09c6 df2fa c36ae
jess/master
jess/master..c36ae
ce0e4
master
5ec47 2f45e 4eadf 2fbb3 18cae
b3be1 a09c6 df2fa c36ae
jess/master
jess/master..c36ae
ce0e4
master
5ec47 2f45e 4eadf 2fbb3 18cae
b3be1 a09c6 df2fa c36ae
jess/master
jess/master..c36ae
ce0e4
master
5ec47 2f45e 4eadf 2fbb3 18cae
b3be1 a09c6 df2fa c36ae
jess/master
jess/master..c36ae
Ranges
ce0e4...e4272
every commit reachable by either
but not commits reachable by both
ce0e4
master
5ec47 2f45e 4eadf 2fbb3 18cae
b3be1 a09c6 df2fa c36ae
jess/master
jess/master...c36ae
ce0e4
master
5ec47 2f45e 4eadf 2fbb3 18cae
b3be1 a09c6 df2fa c36ae
jess/master
jess/master...c36ae
ce0e4
master
5ec47 2f45e 4eadf 2fbb3 18cae
b3be1 a09c6 df2fa c36ae
jess/master
jess/master...c36ae
ce0e4
master
5ec47 2f45e 4eadf 2fbb3 18cae
b3be1 a09c6 df2fa c36ae
jess/master
jess/master...c36ae
Advanced Log
Log Subsets
git log m/cupcake..
C1
C0
m/cupcake default HEAD
C1
C0
C2
C3
default C4
m/cupcake
HEAD
C1
C0
C2
C3
default C4
m/cupcake
HEAD
git log m/cupcake..
C1
C0
C2
C3
default C4
m/cupcake
HEAD
git log m/cupcake..HEAD
C1
C0
C2
C3
default C4
m/cupcake
HEAD
git log m/cupcake..HEAD
C1
C0
C2
C3
default C4
m/cupcake
HEAD
git log m/cupcake..HEAD
C1
C0
C2
C3
default C4
m/cupcake
HEAD
git log m/cupcake..HEAD
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 "+++"
headers match what was provided on the command line of "diff
--git". 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
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 "+++"
headers match what was provided on the command line of "diff
--git". 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
C2
C3
C4
git log m/cupcake..
git log m/cupcake..HEAD
git log HEAD ^m/cupcake
git log 35ae2 ^9fe42
git log 3e45a ^573eb
git log 3e45a ^573eb
git log 08cb1 ca374 ^c0bf9
C1
C0
C2
C6
C7
C3
C4
C8
C9
C5
m/cupcake default
experiment
m/cupcake
git log c5 c7 ^c9
C1
C0
C2
C6
C7
C3
C4
C8
C9
C5
m/cupcake default
experiment
m/cupcakem/cupcake
default
git log c5 c7 ^c9
C1
C0
C2
C6
C7
C3
C4
C8
C9
C5
m/cupcake default
experiment
m/cupcakem/cupcake
default
git log c5 c7 ^c9
C1
C0
C2
C6
C7
C3
C4
C8
C9
C5
m/cupcake default
experiment
m/cupcakem/cupcake
git log c5 c7 ^c9
C1
C0
C2
C6
C7
C3
C4
C8
C9
C5
m/cupcake default
experiment
git log c5 c7 ^c9
which changes aren’t in
experiment?
C1
C0
C2
C6
C7
C3
C4
C8
C9
C5
m/cupcake default
experiment
git log m/cupcake default ^experiment
C1
C0
C2
C6
C7
C3
C4
C8
C9
C5
m/cupcake default
experiment
git log m/cupcake default ^experiment
C1
C0
C2
C6
C7
C3
C4
C8
C9
C5
m/cupcake default
experiment
git log m/cupcake default ^experiment
C1
C0
C2
C6
C7
C3
C4
C8
C9
C5
m/cupcake default
experiment
git log m/cupcake default ^experiment
C1
C0
C2
C6
C7
C3
C4
C8
C9
C5
m/cupcake default
experiment
git log m/cupcake default ^experiment
C1
C0
C2
C6
C7
C3
C4
C8
C9
C5
m/cupcake default
experiment
git log m/cupcake default ^experiment
C1
C0
C2
C6
C7
C3
C4
C8
C9
C5
m/cupcake default
experiment
git log m/cupcake default ^experiment
Log Formatting
git log -p
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
git log -p
git log --pretty
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
git log --left-right
$ git log --pretty=oneline --left-right 5f7f801...77976b
<5f7f801227868c7abcce7e58dee3eff855011955 convert file browser to html
>77976b24ff839c59c3b20d80cb28351ccb5e59a8 remove cruft
>09b76d2966e2370a78ed37a31c2f7c23d08609c3 git-log
>7000b24511618a21d40b39ee213d397e1d29497d like i said
>c2a6adfcd18c0d95dbed6ea62ac9c9a912d18123 create this on deploy
>6ba3609953d5c46a76ca1d0d3d83018be61454e6 i am too meta for you
<3dff6074fe205e36fae219f277ef87aab097e236 Merge branch 'master' into h
<1cdc8437fa6c621d96c4dfa5f6370c8fdb9cbc3d Merge branch 'master' into h
<20125a6d37d5c1614ffe1de94ca064095968e7f0 delete default images
$ git log --pretty=oneline --left-right 5f7f801...77976b
<5f7f801227868c7abcce7e58dee3eff855011955 convert file browser to html
>77976b24ff839c59c3b20d80cb28351ccb5e59a8 remove cruft
>09b76d2966e2370a78ed37a31c2f7c23d08609c3 git-log
>7000b24511618a21d40b39ee213d397e1d29497d like i said
>c2a6adfcd18c0d95dbed6ea62ac9c9a912d18123 create this on deploy
>6ba3609953d5c46a76ca1d0d3d83018be61454e6 i am too meta for you
<3dff6074fe205e36fae219f277ef87aab097e236 Merge branch 'master' into h
<1cdc8437fa6c621d96c4dfa5f6370c8fdb9cbc3d Merge branch 'master' into h
<20125a6d37d5c1614ffe1de94ca064095968e7f0 delete default images
$ git log --pretty=oneline --left-right 5f7f801...77976b
<5f7f801227868c7abcce7e58dee3eff855011955 convert file browser to html
>77976b24ff839c59c3b20d80cb28351ccb5e59a8 remove cruft
>09b76d2966e2370a78ed37a31c2f7c23d08609c3 git-log
>7000b24511618a21d40b39ee213d397e1d29497d like i said
>c2a6adfcd18c0d95dbed6ea62ac9c9a912d18123 create this on deploy
>6ba3609953d5c46a76ca1d0d3d83018be61454e6 i am too meta for you
<3dff6074fe205e36fae219f277ef87aab097e236 Merge branch 'master' into h
<1cdc8437fa6c621d96c4dfa5f6370c8fdb9cbc3d Merge branch 'master' into h
<20125a6d37d5c1614ffe1de94ca064095968e7f0 delete default images
$ git log --pretty=oneline --left-right 5f7f801...77976b
<5f7f801227868c7abcce7e58dee3eff855011955 convert file browser to html
>77976b24ff839c59c3b20d80cb28351ccb5e59a8 remove cruft
>09b76d2966e2370a78ed37a31c2f7c23d08609c3 git-log
>7000b24511618a21d40b39ee213d397e1d29497d like i said
>c2a6adfcd18c0d95dbed6ea62ac9c9a912d18123 create this on deploy
>6ba3609953d5c46a76ca1d0d3d83018be61454e6 i am too meta for you
<3dff6074fe205e36fae219f277ef87aab097e236 Merge branch 'master' into h
<1cdc8437fa6c621d96c4dfa5f6370c8fdb9cbc3d Merge branch 'master' into h
<20125a6d37d5c1614ffe1de94ca064095968e7f0 delete default images
git log --graph
git log --pretty=oneline --graph
gitk
gitk 6d13f..41aba
Merged Branches
git branch --merged
git branch --no-merged
Branch Diffs
git diff branch
diff --git a/Rakefile b/Rakefile
index eb54561..2d2c777 100644
--- a/Rakefile
+++ b/Rakefile
@@ -17,10 +17,6 @@ Rake::GemPackageTask.new(spec) do |pkg|
pkg.need_tar = true
end
-task :default => "pkg/#{spec.name}-#{spec.version}.gem" do
- puts "generated latest version"
-end
-
desc "Regenerate Documentation"
task :doc do |t|
system('rdoc lib/ README --main README --inline-source')
diff --git a/TODO b/TODO
deleted file mode 100644
index bbe7708..0000000
--- a/TODO
+++ /dev/null
@@ -1,7 +0,0 @@
-Git Functions:
-* add
git diff --stat
$ git diff --stat branch1
Rakefile | 4 ----
TODO | 7 -------
lib/simple_git.rb | 48 -------------------------------------------
lib/simplegit.rb | 52 +++++++++++++++++++++++++++++++++++++++++++
4 files changed, 52 insertions(+), 59 deletions(-)
git diff --name-only
$ git diff --name-only branch
Rakefile
TODO
lib/simple_git.rb
lib/simplegit.rb
git diff branch
git diff branch HEAD
git diff branch1 branch2
Revision Diffs
git diff revA revB
C1
C0
C2
C6
C7
C3
C4
C8
C9
C5
m/cupcake default
experiment
C1
C0
C2
C6
C7
C3
C4
C8
C9
C5
m/cupcake default
experiment
git diff c6 c4
C1
C0
C2
C6
C7
C3
C4
C8
C9
C5
m/cupcake default
experiment
git diff c6 c4
C1
C0
C2
C6
C7
C3
C4
C8
C9
C5
m/cupcake default
experiment
git diff c6 c4
C1
C0
C2
C6
C7
C3
C4
C8
C9
C5
m/cupcake default
experiment
git diff c6 c4
this may not be what you want!
C1
C0
C2
C6
C7
C3
C4
C8
C9
C5
m/cupcake default
experiment
./file1C1
C2
C1
C0
C2
C6
C7
C3
C4
C8
C9
C5
m/cupcake default
experiment
./file1C1
./file1
./file2
C2
C1
C0
C2
C6
C7
C3
C4
C8
C9
C5
m/cupcake default
experiment
./file1C1
./file1
./file2
C3 ./file1
./file3
C2
C1
C0
C2
C6
C7
C3
C4
C8
C9
C5
m/cupcake default
experiment
./file1C1
./file1
./file2
C3 ./file1
./file3
C4 ./file1
./file3
./file4
C2
C1
C0
C2
C6
C7
C3
C4
C8
C9
C5
m/cupcake default
experiment
./file1C1
./file1
./file2
C3 ./file1
./file3
C4 ./file1
./file3
./file4
C6 ./file1
./file2
./file6
C2
./file1C1
./file1
./file2
C3 ./file1
./file3
C4 ./file1
./file3
./file4
C6 ./file1
./file2
./file6
git diff c6 c4
+file3
+file4
C2
./file1C1
./file1
./file2
C3 ./file1
./file3
C4 ./file1
./file3
./file4
C6 ./file1
./file2
./file6
git diff c6 c4
+file3
+file4
C2
./file1C1
./file1
./file2
C3 ./file1
./file3
C4 ./file1
./file3
./file4
C6 ./file1
./file2
./file6
git diff c6 c4
+file3
+file4
-file2
-file6
C2
./file1C1
./file1
./file2
C3 ./file1
./file3
C4 ./file1
./file3
./file4
C6 ./file1
./file2
./file6
git diff c6 c4
+file3
+file4
-file2
-file6
C2
./file1C1
./file1
./file2
C3 ./file1
./file3
C4 ./file1
./file3
./file4
C6 ./file1
./file2
./file6
git diff c6 c4
+file3
+file4
-file2
-file6
C2
./file1C1
./file1
./file2
C3 ./file1
./file3
C4 ./file1
./file3
./file4
C6 ./file1
./file2
./file6
git diff c1 c4
+file3
+file4
C2
./file1
./file1
./file2
C3 ./file1
./file3
C4./file1
./file2
./file6
git diff c6...c4
+file3
+file4
./file1
./file3
./file4
C6
C1
Undo
Single File
git checkout [commit] file
$ git checkout master@{yesterday} netcfg.c
$ git checkout v1.0 netcfg.c
Entire Project
git reset
$ git status
# Not currently on any branch.
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
#	 modified: src/com/android/launcher/Workspace.java
#
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in
working directory)
#
#	 modified: src/com/android/launcher/LiveFolder.java
#
$ git status
# Not currently on any branch.
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
#	 modified: src/com/android/launcher/Workspace.java
#
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in
working directory)
#
#	 modified: src/com/android/launcher/LiveFolder.java
#
$ git status
# Not currently on any branch.
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
#	 modified: src/com/android/launcher/Workspace.java
#
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in
working directory)
#
#	 modified: src/com/android/launcher/LiveFolder.java
#
$ git status
# Not currently on any branch.
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
#	 modified: src/com/android/launcher/Workspace.java
#
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in
working directory)
#
#	 modified: src/com/android/launcher/LiveFolder.java
#
by default, reset changes
the staging area
$ git status
# Not currently on any branch.
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
#	 modified: src/com/android/launcher/Workspace.java
#
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in
working directory)
#
#	 modified: src/com/android/launcher/LiveFolder.java
#
$ git reset --hard
--hard changes stage
and working directory
you’ve made commits,
but want to move them
to a topic branch
$ git branch experiment
$ git reset --hard origin/master
$ git checkout topicname
$ git branch experiment
$ git reset --hard origin/master
$ git checkout topicname
$ git branch experiment
$ git reset --hard origin/master
$ git checkout experiment
C0
HEAD
C1origin/master
master
C0
HEAD
C1origin/master
master
C2
C3
C0
HEAD
C1origin/master
master
C2
C3 experiment
git checkout experiment
C0
HEAD
C1origin/master
master C2
C3 experiment
git reset --hard origin/master
C0
HEAD
C1origin/master
master C2
C3
experiment
C4
git commit
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 "cache.h"
85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 2) #include "pkt-line.h"
77cb17e9 (Michal Ostrowski 2006-01-10 21:12:17 -0500 3) #include "exec_cmd.h"
49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 4) #include "interpolate.h"
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) "git daemon [--verbose] [--syslog] [
3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 22) " [--timeout=n] [--init-ti
3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 23) " [--strict-paths] [--base
73a7a656 (Jens Axboe 2007-07-27 14:00:29 -0700 24) " [--user-path | --user-pa
49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 25) " [--interpolated-path=pat
678dac6b (Tilman Sauerbeck 2006-08-22 19:37:41 +0200 26) " [--reuseaddr] [--detach]
d9edcbd6 (Junio C Hamano 2006-09-07 01:40:04 -0700 27) " [--[enable|disable|allow
dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 28) " [--inetd | [--listen=hos
dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 29) " [--user=user
dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 30) " [directory...]";
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 "cache.h"
85023577 (Junio C Hamano 2006-12-19 14:34:12 -0800 2) #include "pkt-line.h"
77cb17e9 (Michal Ostrowski 2006-01-10 21:12:17 -0500 3) #include "exec_cmd.h"
49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 4) #include "interpolate.h"
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) "git daemon [--verbose] [--syslog] [
3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 22) " [--timeout=n] [--init-ti
3bd62c21 (Stephen R. van den Berg 2008-08-14 20:02:20 +0200 23) " [--strict-paths] [--base
73a7a656 (Jens Axboe 2007-07-27 14:00:29 -0700 24) " [--user-path | --user-pa
49ba83fb (Jon Loeliger 2006-09-19 20:31:51 -0500 25) " [--interpolated-path=pat
678dac6b (Tilman Sauerbeck 2006-08-22 19:37:41 +0200 26) " [--reuseaddr] [--detach]
d9edcbd6 (Junio C Hamano 2006-09-07 01:40:04 -0700 27) " [--[enable|disable|allow
dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 28) " [--inetd | [--listen=hos
dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 29) " [--user=user
dd467629 (Jon Loeliger 2006-09-26 09:47:43 -0500 30) " [directory...]";
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 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation
Git 101 tutorial presentation

More Related Content

What's hot

Git and github fundamental
Git and github fundamentalGit and github fundamental
Git and github fundamental
Rajesh Kumar
 
GIT presentation
GIT presentationGIT presentation
GIT presentation
Naim Latifi
 
Git and Github
Git and GithubGit and Github
Git and Github
Wen-Tien Chang
 
Git training
Git trainingGit training
Git training
adm_exoplatform
 
Deep dark-side of git: How git works internally
Deep dark-side of git: How git works internallyDeep dark-side of git: How git works internally
Deep dark-side of git: How git works internally
SeongJae Park
 
Git, from the beginning
Git, from the beginningGit, from the beginning
Git, from the beginning
James Aylett
 
Git: A Getting Started Presentation
Git: A Getting Started PresentationGit: A Getting Started Presentation
Git: A Getting Started Presentation
Nap Ramirez
 
Git training v10
Git training v10Git training v10
Git training v10
Skander Hamza
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
E Carter
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
Lee Hanxue
 
Introduction to git administration
Introduction to git administrationIntroduction to git administration
Introduction to git administration
Shawn Doyle
 
Git & GitHub for Beginners
Git & GitHub for BeginnersGit & GitHub for Beginners
Git & GitHub for Beginners
Sébastien Saunier
 
Inside GitHub with Chris Wanstrath
Inside GitHub with Chris WanstrathInside GitHub with Chris Wanstrath
Inside GitHub with Chris Wanstrath
SV Ruby on Rails Meetup
 
What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...
What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...
What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...
Edureka!
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHub
Nicolás Tourné
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git Tutorial
Sage Sharp
 
Introduction To Git For Version Control Architecture And Common Commands Comp...
Introduction To Git For Version Control Architecture And Common Commands Comp...Introduction To Git For Version Control Architecture And Common Commands Comp...
Introduction To Git For Version Control Architecture And Common Commands Comp...
SlideTeam
 
Git - a powerful version control tool
Git - a powerful version control toolGit - a powerful version control tool
Git - a powerful version control tool
Kuo-Le Mei
 
Git Tutorial I
Git Tutorial IGit Tutorial I
Git Tutorial I
Jim Yeh
 
Introduction git
Introduction gitIntroduction git
Introduction git
Dian Sigit Prastowo
 

What's hot (20)

Git and github fundamental
Git and github fundamentalGit and github fundamental
Git and github fundamental
 
GIT presentation
GIT presentationGIT presentation
GIT presentation
 
Git and Github
Git and GithubGit and Github
Git and Github
 
Git training
Git trainingGit training
Git training
 
Deep dark-side of git: How git works internally
Deep dark-side of git: How git works internallyDeep dark-side of git: How git works internally
Deep dark-side of git: How git works internally
 
Git, from the beginning
Git, from the beginningGit, from the beginning
Git, from the beginning
 
Git: A Getting Started Presentation
Git: A Getting Started PresentationGit: A Getting Started Presentation
Git: A Getting Started Presentation
 
Git training v10
Git training v10Git training v10
Git training v10
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
 
Introduction to git administration
Introduction to git administrationIntroduction to git administration
Introduction to git administration
 
Git & GitHub for Beginners
Git & GitHub for BeginnersGit & GitHub for Beginners
Git & GitHub for Beginners
 
Inside GitHub with Chris Wanstrath
Inside GitHub with Chris WanstrathInside GitHub with Chris Wanstrath
Inside GitHub with Chris Wanstrath
 
What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...
What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...
What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHub
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git Tutorial
 
Introduction To Git For Version Control Architecture And Common Commands Comp...
Introduction To Git For Version Control Architecture And Common Commands Comp...Introduction To Git For Version Control Architecture And Common Commands Comp...
Introduction To Git For Version Control Architecture And Common Commands Comp...
 
Git - a powerful version control tool
Git - a powerful version control toolGit - a powerful version control tool
Git - a powerful version control tool
 
Git Tutorial I
Git Tutorial IGit Tutorial I
Git Tutorial I
 
Introduction git
Introduction gitIntroduction git
Introduction git
 

Viewers also liked

Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners
HubSpot
 
Git 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGit 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using Git
Geoff Hoffman
 
Git 101 Presentation
Git 101 PresentationGit 101 Presentation
Git 101 Presentation
Scott Chacon
 
Quick Introduction to git
Quick Introduction to gitQuick Introduction to git
Quick Introduction to git
Joel Krebs
 
Presentacion git
Presentacion gitPresentacion git
Presentacion git
Ignacio Martín
 
Git 101
Git 101Git 101
Git 101
jayrparro
 
Git for beginners
Git for beginnersGit for beginners
Git for beginners
Arulmurugan Rajaraman
 
Git tutorial
Git tutorial Git tutorial
Git tutorial
TingYen Lee
 
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
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
mobaires
 

Viewers also liked (10)

Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners
 
Git 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGit 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using Git
 
Git 101 Presentation
Git 101 PresentationGit 101 Presentation
Git 101 Presentation
 
Quick Introduction to git
Quick Introduction to gitQuick Introduction to git
Quick Introduction to git
 
Presentacion git
Presentacion gitPresentacion git
Presentacion git
 
Git 101
Git 101Git 101
Git 101
 
Git for beginners
Git for beginnersGit for beginners
Git for beginners
 
Git tutorial
Git tutorial Git tutorial
Git tutorial
 
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
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
 

Similar to Git 101 tutorial presentation

Git
GitGit
10 things I learned building Nomad packs
10 things I learned building Nomad packs10 things I learned building Nomad packs
10 things I learned building Nomad packs
Bram Vogelaar
 
Git basics
Git basicsGit basics
Git basics
Malihe Asemani
 
slides.pdf
slides.pdfslides.pdf
slides.pdf
vidsvagi
 
slides.pdf
slides.pdfslides.pdf
slides.pdf
tanuwedsmanu
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An Introduction
Behzad Altaf
 
guider: a system-wide performance analyzer
guider: a system-wide performance analyzerguider: a system-wide performance analyzer
guider: a system-wide performance analyzer
Peace Lee
 
Accessing File-Specific Attributes on Steroids - EuroPython 2008
Accessing File-Specific Attributes on Steroids - EuroPython 2008Accessing File-Specific Attributes on Steroids - EuroPython 2008
Accessing File-Specific Attributes on Steroids - EuroPython 2008
Dinu Gherman
 
Introduction to GIT
Introduction to GITIntroduction to GIT
Introduction to GIT
Arpit Mohan
 
aptly: Debian repository management tool
aptly: Debian repository management toolaptly: Debian repository management tool
aptly: Debian repository management tool
Andrey Smirnov
 
#WeSpeakLinux Session
#WeSpeakLinux Session#WeSpeakLinux Session
#WeSpeakLinux Session
Kellyn Pot'Vin-Gorman
 
2005_Structures and functions of Makefile
2005_Structures and functions of Makefile2005_Structures and functions of Makefile
2005_Structures and functions of Makefile
NakCheon Jung
 
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교  및 구축 방법[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교  및 구축 방법
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법
Open Source Consulting
 
GTFO: Git Theory For OpenSource
GTFO: Git Theory For OpenSourceGTFO: Git Theory For OpenSource
GTFO: Git Theory For OpenSource
Forest Mars
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQL
Command Prompt., Inc
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQL
Mark Wong
 
Useful linux-commands
Useful linux-commandsUseful linux-commands
Useful linux-commands
Himani Singh
 
Keynote 1 - Engineering Software Analytics Studies
Keynote 1 - Engineering Software Analytics StudiesKeynote 1 - Engineering Software Analytics Studies
Keynote 1 - Engineering Software Analytics Studies
ESEM 2014
 
Git Basic
Git BasicGit Basic
Git Basic
Luke Luo
 
Getting Git Right
Getting Git RightGetting Git Right
Getting Git Right
Sven Peters
 

Similar to Git 101 tutorial presentation (20)

Git
GitGit
Git
 
10 things I learned building Nomad packs
10 things I learned building Nomad packs10 things I learned building Nomad packs
10 things I learned building Nomad packs
 
Git basics
Git basicsGit basics
Git basics
 
slides.pdf
slides.pdfslides.pdf
slides.pdf
 
slides.pdf
slides.pdfslides.pdf
slides.pdf
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An Introduction
 
guider: a system-wide performance analyzer
guider: a system-wide performance analyzerguider: a system-wide performance analyzer
guider: a system-wide performance analyzer
 
Accessing File-Specific Attributes on Steroids - EuroPython 2008
Accessing File-Specific Attributes on Steroids - EuroPython 2008Accessing File-Specific Attributes on Steroids - EuroPython 2008
Accessing File-Specific Attributes on Steroids - EuroPython 2008
 
Introduction to GIT
Introduction to GITIntroduction to GIT
Introduction to GIT
 
aptly: Debian repository management tool
aptly: Debian repository management toolaptly: Debian repository management tool
aptly: Debian repository management tool
 
#WeSpeakLinux Session
#WeSpeakLinux Session#WeSpeakLinux Session
#WeSpeakLinux Session
 
2005_Structures and functions of Makefile
2005_Structures and functions of Makefile2005_Structures and functions of Makefile
2005_Structures and functions of Makefile
 
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교  및 구축 방법[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교  및 구축 방법
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법
 
GTFO: Git Theory For OpenSource
GTFO: Git Theory For OpenSourceGTFO: Git Theory For OpenSource
GTFO: Git Theory For OpenSource
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQL
 
pg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQLpg_proctab: Accessing System Stats in PostgreSQL
pg_proctab: Accessing System Stats in PostgreSQL
 
Useful linux-commands
Useful linux-commandsUseful linux-commands
Useful linux-commands
 
Keynote 1 - Engineering Software Analytics Studies
Keynote 1 - Engineering Software Analytics StudiesKeynote 1 - Engineering Software Analytics Studies
Keynote 1 - Engineering Software Analytics Studies
 
Git Basic
Git BasicGit Basic
Git Basic
 
Getting Git Right
Getting Git RightGetting Git Right
Getting Git Right
 

More from Terry Wang

Introduction to containers, k8s, Microservices & Cloud Native
Introduction to containers, k8s, Microservices & Cloud NativeIntroduction to containers, k8s, Microservices & Cloud Native
Introduction to containers, k8s, Microservices & Cloud Native
Terry Wang
 
Debugging and Configuration Best Practices for Oracle Linux
Debugging and Configuration Best Practices for Oracle LinuxDebugging and Configuration Best Practices for Oracle Linux
Debugging and Configuration Best Practices for Oracle Linux
Terry Wang
 
Btrfs by Chris Mason
Btrfs by Chris MasonBtrfs by Chris Mason
Btrfs by Chris Mason
Terry Wang
 
Oracle Linux Nov 2011 Webcast
Oracle Linux Nov 2011 WebcastOracle Linux Nov 2011 Webcast
Oracle Linux Nov 2011 Webcast
Terry Wang
 
RHEL roadmap
RHEL roadmapRHEL roadmap
RHEL roadmap
Terry Wang
 
Oracle Buys Ksplice
Oracle Buys KspliceOracle Buys Ksplice
Oracle Buys Ksplice
Terry Wang
 
Eliminating Silent Data Corruption with Oracle Linux
Eliminating Silent Data Corruption with Oracle Linux Eliminating Silent Data Corruption with Oracle Linux
Eliminating Silent Data Corruption with Oracle Linux
Terry Wang
 
我的 Ubuntu 之旅
我的 Ubuntu 之旅我的 Ubuntu 之旅
我的 Ubuntu 之旅
Terry Wang
 
Get the Facts: Oracle's Unbreakable Enterprise Kernel
Get the Facts: Oracle's Unbreakable Enterprise KernelGet the Facts: Oracle's Unbreakable Enterprise Kernel
Get the Facts: Oracle's Unbreakable Enterprise Kernel
Terry Wang
 
Git
GitGit
Git 入门 与 实践
Git 入门 与 实践Git 入门 与 实践
Git 入门 与 实践
Terry Wang
 
Git 入门与实践
Git 入门与实践Git 入门与实践
Git 入门与实践