384
Intro to Git Scott Chacon

Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

  • Upload
    others

  • View
    44

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Intro to GitScott Chacon

Page 2: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

What is Git?

Page 3: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Git is an open source, distributed version control system designed for speed

and efficiency

Page 4: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Git is an open source, distributed version control system designed for speed

and efficiency

Page 5: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git-scm.com

Page 6: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Git is an open source, distributed version control

system designed for speed and efficiency

Page 7: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Fully Distributed

Page 8: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

(almost) everything is local

Page 9: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

which means

Page 10: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

which means

everything is fast

Page 11: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

which means

everything is fast

every clone is a backup

Page 12: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

which means

everything is fast

every clone is a backup

work offline

Page 13: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Git is an open source, distributed version control

system designed for speed and efficiency

Page 14: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git
Page 15: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Immutable

Page 16: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

(almost) never removes data

Page 17: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Snapshots, not Patches

Page 18: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 19: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 20: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 21: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 22: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 23: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 24: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 25: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 26: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 27: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 28: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 29: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 30: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 31: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 32: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 33: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

How is this DifferentThan {cvs|svn|p4}?

Page 34: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Git Ist Schnell!

Page 35: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

No Network Needed

Page 36: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

No Network Needed

Performing a diff

Page 37: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

No Network Needed

Performing a diff

Viewing file history

Page 38: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

No Network Needed

Performing a diff

Viewing file history

Committing changes

Page 39: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

No Network Needed

Performing a diff

Viewing file history

Committing changes

Merging branches

Page 40: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

No Network Needed

Performing a diff

Viewing file history

Committing changes

Merging branches

Obtaining any other revision of a file

Page 41: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

No Network Needed

Performing a diff

Viewing file history

Committing changes

Merging branches

Obtaining any other revision of a file

Switching branches

Page 42: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

jQuery tests

Page 43: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git
Page 44: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git
Page 45: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git
Page 46: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git
Page 47: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git
Page 48: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git
Page 49: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Work Offline

Page 50: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

No .svn Directories

Page 51: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Cheap Branching

Page 52: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ du -h testrepo/ 78M testrepo/$ cd testrepo/$ time git checkout -b newbranchSwitched to a new branch "newbranch"

real 0m0.091suser 0m0.016ssys 0m0.023s

Page 53: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ du -h testrepo/ 78M testrepo/$ cd testrepo/$ time git checkout -b newbranchSwitched to a new branch "newbranch"

real 0m0.091suser 0m0.016ssys 0m0.023s

Page 54: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ du -h testrepo/ 78M testrepo/$ cd testrepo/$ time git checkout -b newbranchSwitched to a new branch "newbranch"

real 0m0.091suser 0m0.016ssys 0m0.023s

Page 55: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ du -h testrepo/ 78M testrepo/$ cd testrepo/$ time git checkout -b newbranchSwitched to a new branch "newbranch"

real 0m0.091suser 0m0.016ssys 0m0.023s

Page 56: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ du -h testrepo/ 78M testrepo/$ cd testrepo/$ time git checkout -b newbranchSwitched to a new branch "newbranch"

real 0m0.091suser 0m0.016ssys 0m0.023s

Page 57: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ time cp -Rf testrepo r2

real0m13.684suser0m0.085ssys 0m1.215s

Page 58: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Easy Merging

Page 59: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

How Do I Use Git?

Page 60: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

First Steps

Page 61: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ git config --global user.name “Scott Chacon”

$ git config --global user.email “[email protected]

Page 62: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Getting A Repo

Page 63: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git init

Page 64: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ touch hello_world.rb$ git init$ git add .$ git commit -m ‘first commit’

Page 65: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ touch hello_world.rb$ git init$ git add .$ git commit -m ‘first commit’

Page 66: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ 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

Page 67: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ 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

Page 68: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ 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

Page 69: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git clone

Page 70: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ git clone

Page 71: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ git clone git://github.com/schacon/grit.git

Page 72: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ git clone git://github.com/schacon/grit.git mygrit

Page 73: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ git clone git://github.com/schacon/grit.git mygritInitialized empty Git repository in /home/schacon/mygrit/.git/remote: Counting objects: 3220, done.remote: Compressing objects: 100% (2093/2093), done.remote: Total 3220 (delta 1134), reused 3149 (delta 1081)Receiving objects: 100% (3220/3220), 1.79 MiB | 357 KiB/s, done.Resolving deltas: 100% (1134/1134), done.

Page 74: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ git clone git://github.com/schacon/grit.git mygritInitialized empty Git repository in /home/schacon/mygrit/.git/remote: Counting objects: 3220, done.remote: Compressing objects: 100% (2093/2093), done.remote: Total 3220 (delta 1134), reused 3149 (delta 1081)Receiving objects: 100% (3220/3220), 1.79 MiB | 357 KiB/s, done.Resolving deltas: 100% (1134/1134), done.

$ cd mygrit$

Page 75: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ git clone git://github.com/schacon/grit.git mygritInitialized empty Git repository in /home/schacon/mygrit/.git/remote: Counting objects: 3220, done.remote: Compressing objects: 100% (2093/2093), done.remote: Total 3220 (delta 1134), reused 3149 (delta 1081)Receiving objects: 100% (3220/3220), 1.79 MiB | 357 KiB/s, done.Resolving deltas: 100% (1134/1134), done.

$ cd mygrit$ lsAPI.txt Manifest.txtREADME.txt benchmarks.rb examples libHistory.txt PURE_TODORakefile benchmarks.txt grit.gemspectest$

Page 76: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

The Git Directory

Page 77: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git init

Page 78: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ 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

Page 79: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ 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

Page 80: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Areas of Interest

Page 81: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ 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

Page 82: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

/etc/gitconfig

Page 83: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

/etc/gitconfig

~/.gitconfig

Page 84: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

/etc/gitconfig

~/.gitconfig

.git/config

Page 85: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ 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

Page 86: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ 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

Page 87: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ 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

Page 88: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ touch hello_world.rb$ git init$ git add .$ git commit -m ‘first commit’

Page 89: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ touch hello_world.rb$ git init$ git add .$ git commit -m ‘first commit’

Page 90: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ 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

Page 91: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ 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

Page 92: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ 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

Page 93: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

A Basic Workflow

Page 94: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

A Basic Workflow

Edit files

Stage the changes

Review your changes

Commit the changes

Page 95: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

working directory

repository

index

git add

git commit

Page 96: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

working directory

repository

index

git add

git commit

a working copy of your project

Page 97: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

working directory

repository

index

git add

git commit

object database

Page 98: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

working directory

repository

index

git add

git commit

“staging”

Page 99: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

A Basic Workflow

Edit files

Stage the changes

Review your changes

Commit the changes

Page 100: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ find ../app.yaml./index.yaml./main.py

Page 101: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ find ../app.yaml./index.yaml./main.py

Page 102: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ find ../app.yaml./index.yaml./main.py

Page 103: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

#!/usr/bin/env pythonimport wsgiref.handlersfrom 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

Page 104: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

#!/usr/bin/env pythonimport wsgiref.handlersfrom 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

Page 105: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

#!/usr/bin/env pythonimport wsgiref.handlersfrom 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

Page 106: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

#!/usr/bin/env pythonimport wsgiref.handlersfrom 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

Page 107: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ git status

Page 108: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ git status# On branch master# Changed but not updated:# (use "git add <file>..." to update what will be committed)##modified: main.py#no changes added to commit (use "git add" and/or "git commit -a")

Page 109: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ git status# On branch master# Changed but not updated:# (use "git add <file>..." to update what will be committed)##modified: main.py#no changes added to commit (use "git add" and/or "git commit -a")

Page 110: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ git status# On branch master# Changed but not updated:# (use "git add <file>..." to update what will be committed)##modified: main.py#no changes added to commit (use "git add" and/or "git commit -a")

Page 111: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ git status# On branch master# Changed but not updated:# (use "git add <file>..." to update what will be committed)##modified: main.py#no changes added to commit (use "git add" and/or "git commit -a")

Page 112: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ git status# On branch master# Changed but not updated:# (use "git add <file>..." to update what will be committed)##modified: main.py#no changes added to commit (use "git add" and/or "git commit -a")

Page 113: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ git status# On branch master# Changed but not updated:# (use "git add <file>..." to update what will be committed)##modified: main.py#no changes added to commit (use "git add" and/or "git commit -a")

Page 114: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ git status# On branch master# Changed but not updated:# (use "git add <file>..." to update what will be committed)##modified: main.py#no changes added to commit (use "git add" and/or "git commit -a")

STAGED

Page 115: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ git status# On branch master# Changed but not updated:# (use "git add <file>..." to update what will be committed)##modified: main.py#no changes added to commit (use "git add" and/or "git commit -a")

STAGED

Page 116: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

A Basic Workflow

Edit files

Stage the changes

Review your changes

Commit the changes

Page 117: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git add

Page 118: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

working directory

repository

index

git add

git commit

Page 119: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

working directory

repository

index

git add

git commit

Page 120: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ git add main.py$ git status# On branch master# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)##modified: main.py#

Page 121: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ git add main.py$ git status# On branch master# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)##modified: main.py#

Page 122: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ git add main.py$ git status# On branch master# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)##modified: main.py#

Page 123: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

# On branch master# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)##modified: main.py#

$ git add main.py$ git status

Page 124: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

# On branch master# Changes to be committed:# (use "git reset HEAD <file>..." to unstage)##modified: main.py#

$ git add main.py$ git status

THAT ARE STAGED

Page 125: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ vim app.yamlapplication: chaconversion: 1runtime: pythonapi_version: 1

handlers:- url: .* script: main.py~ ~ ~ "app.yaml" 8L, 101C

Page 126: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ vim app.yamlapplication: chaconversion: 1runtime: pythonapi_version: 1

handlers:- url: .* script: main.py~ ~ ~ "app.yaml" 8L, 101C

Page 127: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ vim app.yamlapplication: chaconversion: 1runtime: pythonapi_version: 1

handlers:- url: .* script: main.py~ ~ ~ "app.yaml" 8L, 101C

Page 128: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

application: chaconversion: 1runtime: pythonapi_version: 1

handlers:- url: .* script: main.py~ ~ ~ "app.yaml" 8L, 101C

$ vim app.yaml

Page 129: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

application: chaconversion: 2runtime: pythonapi_version: 1

handlers:- url: .* script: main.py~ ~ ~ "app.yaml" 8L, 101C

$ vim app.yaml

Page 130: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

# 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 committed)## modified: app.yaml#

$ git status

Page 131: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

# 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 committed)## modified: app.yaml#

$ git status

Page 132: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

# 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 committed)## modified: app.yaml#

$ git status

Page 133: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ vim main.py#!/usr/bin/env pythonimport wsgiref.handlersfrom 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

Page 134: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ vim main.py#!/usr/bin/env pythonimport wsgiref.handlersfrom 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

Page 135: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ vim main.py#!/usr/bin/env pythonimport wsgiref.handlersfrom 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

Page 136: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

#!/usr/bin/env pythonimport wsgiref.handlersfrom 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

Page 137: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

#!/usr/bin/env pythonimport wsgiref.handlersfrom 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

Page 138: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

# 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 committed)## modified: app.yaml# modified: main.py#

$ git status

Page 139: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

# 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 committed)## modified: app.yaml# modified: main.py#

$ git status

Page 140: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

# 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 committed)## modified: app.yaml# modified: main.py#

$ git status

Page 141: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

# 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 committed)## modified: app.yaml# modified: main.py#

$ git status

Staged

Page 142: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

# 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 committed)## modified: app.yaml# modified: main.py#

$ git status

Unstaged

Page 143: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

# 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 committed)## modified: app.yaml# modified: main.py#

$ git status

Page 144: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

#!/usr/bin/env pythonimport wsgiref.handlersfrom 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 pythonimport wsgiref.handlersfrom 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

Page 145: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

#!/usr/bin/env pythonimport wsgiref.handlersfrom 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 pythonimport wsgiref.handlersfrom 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

Page 146: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

You have to stage a file after you edit it

Page 147: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

You have to stage a file after you edit it

Page 148: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

You have to stage a file after you edit it

Page 149: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ 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

Page 150: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ 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

Page 151: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ 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

Page 152: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

A Basic Workflow

Edit files

Stage the changes

Review your changes

Commit the changes

Page 153: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git commit

Page 154: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

working directory

repository

index

git add

git commit

Page 155: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

working directory

repository

index

git add

git commit

Page 156: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ 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

Page 157: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ 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

Page 158: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ 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

Page 159: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

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

Page 160: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

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

Page 161: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ git commitCreated commit 77d3001: descriptive commit message 2 files changed, 4 insertions(+), 2 deletions(-)

Page 162: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

A Basic Workflow

Edit files

Stage the changes

Review your changes

Commit the changes

vim / emacs / etc

git add (file)

repo status

git commit

Page 163: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

A Basic Workflow

Edit files

Stage the changes

Review your changes

Commit the changes

vim / emacs / etc

git add (file)

repo status

git commit

Page 164: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

A Basic Workflow

Edit files

Stage the changes

Review your changes

Commit the changes

vim / emacs / etc

git add (file)

repo status

git commit

Page 165: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

A Basic Workflow

Edit files

Stage the changes

Review your changes

Commit the changes

vim / emacs / etc

git add (file)

git status

git commit

Page 166: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

A Basic Workflow

Edit files

Stage the changes

Review your changes

Commit the changes

vim / emacs / etc

git add (file)

git status

git commit

Page 167: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

cheating...

Page 168: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

A Basicerer Workflow

Edit files

Commit the changes

vim / emacs / etc

git commit

Page 169: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

A Basicerer Workflow

Edit files

Stage & commit the changes

vim / emacs / etc

git commit -a

Page 170: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

A Basicerer Workflow

Edit files

Stage & commit the changes

vim / emacs / etc

git commit -a

Page 171: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

What’s going on here?

Page 172: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ git commitCreated commit 77d3001: descriptive commit message 2 files changed, 4 insertions(+), 2 deletions(-)

Page 173: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

$ git commitCreated commit 77d3001: descriptive commit message 2 files changed, 4 insertions(+), 2 deletions(-)

Page 174: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

77d3001

Page 175: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

77d3001

Page 176: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

77d3001a1de6bf8f5e431972fe4d25b01e595c0b

Page 177: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

77d3001a1de6bf8f5e431972fe4d25b01e595c0b

Page 178: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

77d3001a1de6bf8f5e431972fe4d25b01e595c0b

Page 179: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

77d3001a1de6bf8f5e431972fe4d25b01e595c0b

commit size

ae668..

tree

parent

author

committermy commit message goes hereand it is really, really cool

c4ec5

a149eScott

Scott

Page 180: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

77d3001a1de6bf8f5e431972fe4d25b01e595c0b

commit size

ae668..

tree

parent

author

committermy commit message goes hereand it is really, really cool

c4ec5

a149eScott

Scott

tree c4ec543b0322744e55c5efc9b6c4e449d398dbffparent a149e2160b3f7573768cdc2fce24d0881f3577e1author Scott Chacon <[email protected]> 1223402504 -0700committer Scott Chacon <[email protected]> 1223402504 -0700

descriptive commit message

Page 181: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

77d3001a1de6bf8f5e431972fe4d25b01e595c0b

commit size

ae668..

tree

parent

author

committermy commit message goes hereand it is really, really cool

c4ec5

a149eScott

Scott

Page 182: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

77d3001a1de6bf8f5e431972fe4d25b01e595c0b

commit size

ae668..

tree

parent

author

committermy commit message goes hereand it is really, really cool

c4ec5

a149eScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

Page 183: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

commit size

ae668..

tree

parent

author

committermy commit message goes hereand it is really, really cool

c4ec5

a149eScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

commit size

tree

parent

author

committerthis is the previous commitand I am very proud of it

2de54

38defScott

Scott

Page 184: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

commit size

ae668..

tree

parent

author

committermy commit message goes hereand it is really, really cool

c4ec5

a149eScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

commit size

tree

parent

author

committerthis is the previous commitand I am very proud of it

2de54

38defScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

Page 185: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

commit size

ae668..

tree

parent

author

committermy commit message goes hereand it is really, really cool

c4ec5

a149eScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

commit size

tree

parent

author

committerthis is the previous commitand I am very proud of it

2de54

38defScott

Scott

commit size

tree

parent

author

committerthis is the commit before thatand I'm not sure why

2fe65

90ecdScott

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

committerthis is the commit before thatand I'm not sure why

2fe65

90ecdScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

Page 186: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

commit size

ae668..

tree

parent

author

committermy commit message goes hereand it is really, really cool

c4ec5

a149eScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

commit size

tree

parent

author

committerthis is the previous commitand I am very proud of it

2de54

38defScott

Scott

commit size

tree

parent

author

committerthis is the commit before thatand I'm not sure why

2fe65

90ecdScott

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

committerthis is the commit before thatand I'm not sure why

2fe65

90ecdScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

48e 77da1438d

c4e

3d5

1d3

03e

f46

23f

30e

67e

32a

5b1

Page 187: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

commit size

ae668..

tree

parent

author

committermy commit message goes hereand it is really, really cool

c4ec5

a149eScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

commit size

tree

parent

author

committerthis is the previous commitand I am very proud of it

2de54

38defScott

Scott

commit size

tree

parent

author

committerthis is the commit before thatand I'm not sure why

2fe65

90ecdScott

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

committerthis is the commit before thatand I'm not sure why

2fe65

90ecdScott

Scott

app.yaml

index.yaml

main.py

./ c4e

03e

1d3

3d5

48e

77d

a14

38d

c4e

3d51d3

03e

f46

23f 30e

67e

32a

5b1

Page 188: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

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

Page 189: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

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

Page 190: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

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

Page 191: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

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

Page 192: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

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

Page 193: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

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

Page 194: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

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

Page 195: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

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

Page 196: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

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

Page 197: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

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

Page 198: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

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

Page 199: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

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

Page 200: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

object model

blob

commit

tree

C1}

Page 201: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

object model

blob

commit

tree

C1}directory list

file contents

pointer to a snapshot

Page 202: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

object model

blob

commit

tree

C1}directory list

file contents

pointer to a snapshot

Page 203: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Branching and Merging

Page 204: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

branches

Page 205: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

brancheslightweight, movablepointers to a commit

C1

branch

Page 206: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

branching

Page 207: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git branch

Page 208: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git checkout

Page 209: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1

master

C0

C2 C3

experiment

HEAD

default

Page 210: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1

master

C0

C2 C3

experimentC1

master

C0

C2 C3

C4

experiment

C5

T1

git branch experiment

HEAD

default

Page 211: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1

master

C0

C2 C3

experimentC1

master

C0

C2 C3

C4

experiment

C5

T1

git branch experiment

HEAD

default

Page 212: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1

master

C0

C2 C3

experimentC1

master

C0

C2 C3

C4

experiment

C5

T1

HEAD

$ git branch* default experiment

default

Page 213: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1

master

C0

C2 C3

experimentC1

master

C0

C2 C3

C4

experiment

C5

T1

HEAD

$ git branch* default experiment

default

Page 214: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1

master

C0

C2 C3

experimentC1

master

C0

C2 C3

C4

experiment

C5

T1

git checkout experiment

HEAD

default

Page 215: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1

master

C0

C2 C3

experiment

C1

master

C0

C2 C3

C4

experiment

C5

T1

git commit

HEAD

default

Page 216: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1

master

C0

C2 C3

experiment

C1

master

C0

C2 C3

C4

experiment

C5

T1

git commit

HEAD

default

Page 217: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1

master

C0

C2 C3

experiment

C1

master

C0

C2 C3

C4

experiment

C5

T1

git commit

HEAD

default

Page 218: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1

master

C0

C2 C3

experiment

C1

master

C0

C2 C3

C4

experiment

C5

T1

git commitgit commit

HEAD

default

Page 219: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1

master

C0

C2 C3

experiment

C1

master

C0

C2 C3

C4

experiment

C5

T1

HEAD

git checkout defaultdefault

Page 220: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1

master

C0

C2 C3

experiment

C1

master

C0

C2 C3

C4

experiment

C5

T1

HEAD

git checkout defaultdefault

Page 221: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1

master

C0

C2 C3

C4

experiment

C5

T1

C1

master

C0

C2 C3

C4

experiment

C5

T1git commit

HEAD

default

Page 222: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1

master

C0

C2 C3

C4

experiment

C5

T1

C1

master

C0

C2 C3

C4

experiment

C5

T1git commit

HEAD

default

Page 223: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1

master

C0

C2 C3

C4

experiment

C5

T1

C1

master

C0

C2 C3

C4

experiment

C5

T1git commit

HEAD

default

Page 224: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1

master

C0

C2 C3

C4

experiment

C5

T1

git checkout experimentgit commit

HEAD

default

Page 225: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

merging

Page 226: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git merge

Page 227: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1

master

C0

C2 C3

C4

experiment

C5

T1

HEAD

default

Page 228: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1

master

C0

C2 C3

C4

experiment

C5

T1

HEAD

git checkout default

default

Page 229: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1C0

C2 C3

C4

experiment

C5

C6

masterT1

git checkout defaultgit merge experiment

HEAD

default

Page 230: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1C0

C2 C3

C4

experiment

C5

C6

masterT1

git checkout defaultgit merge experiment

HEAD

default

Page 231: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1C0

C2 C3

C4

C5

C6

C7

C8

default

experiment

HEADgit checkout experiment

Page 232: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1C0

C2 C3

C4

C5

C6

C7

C8

default

experiment

HEADgit commit

Page 233: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1C0

C2 C3

C4

C5

C6

C7

C8

default

experiment

HEAD

git checkout default

Page 234: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1C0

C2 C3

C4

C5

C6

C7

C8

default

experiment

HEAD

git merge experiment

Page 235: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Hot 3 Way Merge

Action

Page 236: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1

master

C0

C2 C3

C4

experiment

C5

Page 237: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1

master

C0

C2 C3

C4

experiment

C5

Page 238: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1C0

C2 C3

C4

C5

C6

C7

Page 239: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1C0

C2 C3

C4

C5

C6

C7

Page 240: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C1C0

C2 C3

C4

C5

C6

C7

Page 241: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Remotes

Page 242: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Distributed Workflow

Page 243: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

public repo

local repo

local repo

public repo

internet

A B C

Page 244: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

public repo

local repo

local repo

public repo

git push(ssh)

internet

A B C

A B C

Page 245: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

public repo

local repo

local repo

public repo

git push(ssh)

git fetch(git)

internet

A B C

A B C

A B C

Page 246: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

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

Page 247: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

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

Page 248: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

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

Page 249: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

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

Page 250: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Multiple Remotes

Page 251: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

developernick

developerjessica

my repo5ec

e4a4a7ce0 master

Page 252: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

developernick

developerjessica

my repo5ec

e4a4a7ce0 master

commit

Page 253: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

developernick

developerjessica

my repo5ec

e4a4a7ce0 master

tree

Page 254: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

developernick

developerjessica

my repo5ec

e4a4a7ce0 master

blobs

Page 255: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

schacon/project

developernick

developerjessica

"public"

my repo5ec

e4a4a7ce0 master

git push public

public/master

5ece4a

4a7ce0

Page 256: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

schacon/project

developerjessica

"public"

my repo5ec

e4a4a7ce0 master

git clone (url)

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nick

Page 257: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

schacon/project

developerjessica

"public"

my repo5ec

e4a4a7ce0 master

git commit

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

Page 258: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f git clone (url)

5ece4a

4a7ce0developer

jessica

Page 259: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09git commit

Page 260: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09git push

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09

Page 261: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git remote add nick git://github.com/nickh/project.git

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick"

git remote add nick git://github.com/nickh/project.git

Page 262: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git remote add nick git://github.com/nickh/project.git

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick"“nick”

git remote add nick git://github.com/nickh/project.git

Page 263: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git remote add jess git://github.com/jessica/project.git

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

git remote add jess git://github.com/jessica/project.git

Page 264: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git remote add jess git://github.com/jessica/project.git

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

git remote add jess git://github.com/jessica/project.git

“jess”

Page 265: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git remote add jess git://github.com/jessica/project.git

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git fetch nick

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

c12ec524f nick/master

git fetch nick

Page 266: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git remote add jess git://github.com/jessica/project.git

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git fetch nick

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

c12ec524f nick/master

git fetch nick

Page 267: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git fetch nick

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

c12ec524f nick/master

Page 268: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git remote add jess git://github.com/jessica/project.git

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

git fetch jess

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git fetch jess

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

ec524f nick/master

2fbdf74eaa09

jess/masterc12

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git fetch nick

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

c12ec524f nick/master

Page 269: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git remote add jess git://github.com/jessica/project.git

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

git fetch jess

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git fetch jess

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

ec524f nick/master

2fbdf74eaa09

jess/masterc12

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git fetch nick

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

c12ec524f nick/master

Page 270: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

schacon/project

"public"

my repo5ec

e4a4a7ce0 master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git fetch jess

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

ec524f nick/master

2fbdf74eaa09

jess/masterc12

Page 271: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

schacon/project

"public"

my repo5ec

e4a4a7ce0

master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

ec524f nick/master

2fbdf74eaa09

jess/masterc12

b3bc63

git merge nick jess

Page 272: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

schacon/project

"public"

my repo5ec

e4a4a7ce0

master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

git push public

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

ec524f nick/master

2fbdf74eaa09

jess/masterc12

b3bc63

e4aec524f

2fbdf74eaa09

c12

b3bc63

Page 273: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

schacon/project

"public"

my repo5ec

e4a4a7ce0

master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

ec524f nick/master

2fbdf74eaa09

jess/masterc12

b3bc63

e4aec524f

2fbdf74eaa09

c12

b3bc63

Page 274: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

schacon/project

"public"

my repo5ec

e4a4a7ce0

master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

ec524f nick/master

2fbdf74eaa09

jess/masterc12

b3bc63

e4aec524f

2fbdf74eaa09

c12

b3bc63

Page 275: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

schacon/project

"public"

my repo5ec

e4a4a7ce0

master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

ec524f nick/master

2fbdf74eaa09

jess/masterc12

b3bc63

e4aec524f

2fbdf74eaa09

c12

b3bc63

Page 276: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

schacon/project

"public"

my repo5ec

e4a4a7ce0

master

public/master

5ece4a

4a7ce0

5ece4a

4a7ce0developer

nickc12ec524f

5ece4a

4a7ce0developer

jessica2fbdf74ea

a09

5ece4a

4a7ce0nickh/project

c12ec524f

5ece4a

4a7ce0jessica/project

2fbdf74eaa09"nick" "jess"

ec524f nick/master

2fbdf74eaa09

jess/masterc12

b3bc63

e4aec524f

2fbdf74eaa09

c12

b3bc63

Page 277: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Remotes Are Branches

Page 278: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C0

default

scott jessica

C1

Page 279: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C0

default

scott jessica

C1

C0

scott/default default

C1

Page 280: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C0

default

scott jessica

C1

C0

scott/default default

C1

git clone

Page 281: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C0

default

scott jessica

C1

C0

scott/default default

C1

Page 282: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C0

default

scott jessica

C1

C0

scott/default default

C1

Page 283: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C0

default

scott jessica

C1 C1

C0

scott/default

default

C2

C3

C4

Page 284: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C0

default

scott jessica

C1 C1

C0

scott/default

default

C2

C3

C4

Page 285: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C0

default

scott jessica

C1 C1

C0

scott/default

default

C2

C3

C4

Page 286: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C0

default

scott

C1

C5

C6

C7

jessica

C1

C0

scott/default

default

C2

C3

C4

Page 287: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C0

default

scott

C1

C5

C6

C7

jessica

C1

C0

scott/default

default

C2

C3

C4

Page 288: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C0

default

scott jessica

C1

C0

scott/default default

C2

C3

C4

C1

C5

C6

C7

C5

C6

C7

Page 289: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C0

default

scott jessica

C1

C0

scott/default default

C2

C3

C4

C1

C5

C6

C7

C5

C6

C7

experiment

C8

C9

Page 290: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C0

default

scott jessica

C1

C0

scott/default default

C2

C3

C4

C1

C5

C6

C7

C5

C6

C7

experiment

C8

C9

Page 291: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

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

Page 292: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C0

default

scott jessica

C1

C0

scott/default default

C2

C3

C4

C1

C5

C6

C7

C5

C6

C7

experiment

C8

C9

Page 293: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

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 alocal pointer to the last known

state of another repository

Page 294: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Why is this cool?

Page 295: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

non-linear development

Page 296: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git
Page 297: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

• clone the code that is in production

Page 298: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

• clone the code that is in production

• create a branch for issue #53 (iss53)

Page 299: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

• clone the code that is in production

• create a branch for issue #53 (iss53)

• work for 10 minutes

Page 300: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

• clone the code that is in production

• create a branch for issue #53 (iss53)

• work for 10 minutes

• someone asks for a hotfix for issue #102

Page 301: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

• clone the code that is in production

• create a branch for issue #53 (iss53)

• work for 10 minutes

• someone asks for a hotfix for issue #102

• checkout ‘production’

Page 302: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

• clone the code that is in production

• create a branch for issue #53 (iss53)

• work for 10 minutes

• someone asks for a hotfix for issue #102

• checkout ‘production’

• create a branch (iss102)

Page 303: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

• clone the code that is in production

• create a branch for issue #53 (iss53)

• work for 10 minutes

• someone asks for a hotfix for issue #102

• checkout ‘production’

• create a branch (iss102)

• fix the issue

Page 304: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

• clone the code that is in production

• create a branch for issue #53 (iss53)

• work for 10 minutes

• someone asks for a hotfix for issue #102

• checkout ‘production’

• create a branch (iss102)

• fix the issue

• checkout ‘production’, merge ‘iss102’

Page 305: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

• clone the code that is in production

• create a branch for issue #53 (iss53)

• work for 10 minutes

• someone asks for a hotfix for issue #102

• checkout ‘production’

• create a branch (iss102)

• fix the issue

• checkout ‘production’, merge ‘iss102’

• push ‘production’

Page 306: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

• clone the code that is in production

• create a branch for issue #53 (iss53)

• work for 10 minutes

• someone asks for a hotfix for issue #102

• checkout ‘production’

• create a branch (iss102)

• fix the issue

• checkout ‘production’, merge ‘iss102’

• push ‘production’

• etc

Page 307: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C0

production

C1origin/master

git clone

Page 308: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C0

production

C1origin/master iss53

git checkout -b iss53

Page 309: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C0

production

C1origin/master

iss53

C2

git commit

Page 310: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C0

production

C1origin/master

iss53

C2

C3

git commit

Page 311: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C0

production

C1origin/master

iss53

C2

C3

iss102

git checkout productiongit checkout -b iss102

Page 312: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C0

production

C1origin/master

iss53

C2

C3 iss102

C4

git commit

Page 313: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C0

production

C1origin/master

iss53

C2

C3

iss102 C4

git checkout productiongit merge iss102

Page 314: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C0

production

C1

origin/master

iss53

C2

C3

C4

git push

Page 315: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C0

production

C1

origin/master

iss53

C2

C3

C4

C5

git checkout iss53git commit

Page 316: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C0

production

C1

origin/master

iss53

C2

C3

C4

C5

iss53v2

git checkout productiongit checkout -b iss53v2

Page 317: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

C0

production

C1

origin/master

iss53

C2

C3

C4

C5

iss53v2

C6

C7

git commitgit commit

Page 318: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

try out an idea

Page 319: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

isolate work units

Page 320: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

long running topics

Page 321: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

pain freecontext switching

Page 322: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Changes

Page 323: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 324: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 325: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

deltastorage

!

!

! !

! ! !

snapshotstorage

Page 326: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git diff

Page 327: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git
Page 328: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

What is not yet staged?

Page 329: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git diff

Page 330: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git diff

working directory

repository

index

Page 331: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

What is staged?

Page 332: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git diff --cached

Page 333: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git diff --cached

working directory

repository

index

Page 334: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Unified Diff

Page 335: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git diff > change.patch

Page 336: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git diff > change.patch

patch -p1 < change.patch

Page 337: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git diff > change.patch

patch -p1 < change.patch

git apply change.patchor

Page 338: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

History

Page 339: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git log

Page 340: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git
Page 341: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git
Page 342: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git
Page 343: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git
Page 344: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git
Page 345: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git
Page 346: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git
Page 347: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git
Page 348: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

What am I about to submit?

Page 349: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git log [branch]..

Page 350: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git log origin/master..

Page 351: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git log origin/master..

what you’ve committed that isn’t pushed yet

Page 352: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Git Help

Page 353: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git [command] --help

Page 354: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git help [command]

Page 355: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git-scm.com

Page 356: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git-scm.com

Page 357: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git
Page 358: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git
Page 359: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git
Page 360: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git
Page 361: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git
Page 362: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git
Page 363: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git
Page 364: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Basic Commands Review

Page 365: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

12

Page 366: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git init

12

Page 367: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git init

git clone

12

Page 368: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git init

git clone

git add 12

Page 369: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git init

git clone

git add

git commit 12

Page 370: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git init

git clone

git add

git commit

git branch12

Page 371: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git init

git clone

git add

git commit

git branch

git checkout

12

Page 372: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git init

git clone

git add

git commit

git branch

git checkout

git merge

12

Page 373: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git init

git clone

git add

git commit

git branch

git checkout

git merge

git remote

12

Page 374: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git init

git clone

git add

git commit

git branch

git checkout

git merge

git remote

git fetch 12

Page 375: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git init

git clone

git add

git commit

git branch

git checkout

git merge

git remote

git fetch

git push 12

Page 376: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git init

git clone

git add

git commit

git branch

git checkout

git merge

git remote

git fetch

git push

git diff12

Page 377: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

git init

git clone

git add

git commit

git branch

git checkout

git merge

git remote

git fetch

git push

git diff

git log

12

Page 378: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

that’s it!

Page 379: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Resources

Page 380: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Resources

git-scm.com

Page 381: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Resources

git-scm.com

gitcasts.com

Page 382: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Resources

git-scm.com

gitcasts.com

learn.github.com

Page 383: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Resources

git-scm.com

gitcasts.com

learn.github.com

#git / #github on IRC

Page 384: Intro to Git...no changes added to commit (use "git add" and/or "git commit -a") STAGED. A Basic Workflow Edit files Stage the changes Review your changes Commit the changes. git

Resources

git-scm.com

gitcasts.com

learn.github.com

#git / #github on IRC

peepcode - git book and screencast