SlideShare uma empresa Scribd logo
1 de 127
Baixar para ler offline
Pragmatic Guide

GIT   Travis Swicegood

      #gittalk
Licensed under Creative Commons,
     Attribution, Share-Alike
#gittalk
pragmatic guide to git by travis swicegood   some rights reserved
Hi, I’m Travis
pragmatic guide to git by travis swicegood   some rights reserved
pragmatic guide to git by travis swicegood   some rights reserved
Git is Easy
pragmatic guide to git by travis swicegood   some rights reserved
What’s this
               talk about?
pragmatic guide to git by travis swicegood   some rights reserved
What this
  talk isn’t about?
pragmatic guide to git by travis swicegood   some rights reserved
Contents
pragmatic guide to git by travis swicegood   some rights reserved
Starting Out
pragmatic guide to git by travis swicegood   some rights reserved
Daily Work
pragmatic guide to git by travis swicegood   some rights reserved
Branches
pragmatic guide to git by travis swicegood   some rights reserved
Team Work
pragmatic guide to git by travis swicegood   some rights reserved
Glossary
pragmatic guide to git by travis swicegood   some rights reserved
Starting Out
pragmatic guide to git by travis swicegood   some rights reserved
Installation
pragmatic guide to git by travis swicegood   some rights reserved
Installation–Compiling
     … download latest source from git-scm.com…
     prompt> make && make install
     … if you’re adventurous…
     prompt> make docs && make install-docs




pragmatic guide to git by travis swicegood   some rights reserved
Installation–Ubuntu
     prompt> apt-get install git-core
     … optional …
     prompt> apt-get install git-doc git-svn




pragmatic guide to git by travis swicegood   some rights reserved
Installation–Windows
                                  Cygwin: http://cygwin.org



                                  msysGit:
                                  http://code.google.com/p/msysgit/



pragmatic guide to git by travis swicegood                some rights reserved
Installation–OS X
     prompt> brew install git

                                        –OR–
                    Git OS X Installer:
                    http://code.google.com/p/git-osx-installer/




pragmatic guide to git by travis swicegood            some rights reserved
Verifying the Install
     prompt> git --version
     git version 1.7.3.2




pragmatic guide to git by travis swicegood   some rights reserved
My Version
     prompt> git --version
     git version 1.7.3.2
     hub version 1.4.1




pragmatic guide to git by travis swicegood   some rights reserved
Getting
                      Help
pragmatic guide to git by travis swicegood   some rights reserved
Built-in Help
     prompt> git help
     prompt> git help <some command>
     prompt> open http://j.mp/gitdocs/




pragmatic guide to git by travis swicegood   some rights reserved
Configuration
pragmatic guide to git by travis swicegood   some rights reserved
User & Email
     prompt> git config --global user.name 
             “Travis Swicegood”
     prompt> git config --global user.email 
             “travis@domain51.com”




pragmatic guide to git by travis swicegood   some rights reserved
Colors
     prompt> git config --global color.ui auto




pragmatic guide to git by travis swicegood   some rights reserved
Creating New
 Repositories
pragmatic guide to git by travis swicegood   some rights reserved
Repository
pragmatic guide to git by travis swicegood   some rights reserved
Commit
pragmatic guide to git by travis swicegood   some rights reserved
Initialization
     prompt> git init
     … example …
     prompt> mkdir /work/some-repo
     prompt> cd /work/some-repo
     prompt> git init




pragmatic guide to git by travis swicegood   some rights reserved
Working
                 Tree
pragmatic guide to git by travis swicegood   some rights reserved
Cloning New
 Repositories
pragmatic guide to git by travis swicegood   some rights reserved
Cloning
     prompt> git clone <some repo>
     … example …
     prompt> git clone 
      git://github.com/tswicegood/bobby-tables.git
     prompt> cd bobby-tables




pragmatic guide to git by travis swicegood   some rights reserved
Cloning
     prompt> git clone <some repo>
     … example …
     prompt> git clone 
      git://github.com/tswicegood/bobby-tables.git
     prompt> cd bobby-tables




pragmatic guide to git by travis swicegood   some rights reserved
Daily Work
pragmatic guide to git by travis swicegood   some rights reserved
Seeing What’s
   Changed
pragmatic guide to git by travis swicegood   some rights reserved
Status
     prompt> git status
     … example …
     prompt> git status
     # On branch master
     nothing to commit (working directory clean)




pragmatic guide to git by travis swicegood   some rights reserved
Staging
               Changes
pragmatic guide to git by travis swicegood   some rights reserved
Index
pragmatic guide to git by travis swicegood   some rights reserved
(aka)

                  Staging
                   Area
pragmatic guide to git by travis swicegood     some rights reserved
Adding a New File
     prompt> git status
     # On branch master
     # Untracked files:
     # (use "git add <file>..." to include in what…
     #
     # README.rst



pragmatic guide to git by travis swicegood   some rights reserved
Adding a New File
     prompt> git add README.rst
     prompt> git status
     # On branch master
     # Changes to be committed:
     # (use "git rm --cached <file>..." to unstage)
     #
     # new file: README.rst


pragmatic guide to git by travis swicegood   some rights reserved
Committing
     Changes
pragmatic guide to git by travis swicegood   some rights reserved
Creating a Commit
     prompt> git commit -m “some great message”
     [master 600f084] some great message
      0 files changed, 0 insertions(+), 0 deletions(-)
      create mode 100644 README.rst




pragmatic guide to git by travis swicegood   some rights reserved
Creating a Commit
     prompt> git commit -m “some great message”
     [master 600f084] some great message
      0 files changed, 0 insertions(+), 0 deletions(-)
      create mode 100644 README.rst




pragmatic guide to git by travis swicegood   some rights reserved
Creating a Commit
     prompt> git commit -m “some great message”
     [master 600f084] some great message
      0 files changed, 0 insertions(+), 0 deletions(-)
      create mode 100644 README.rst




pragmatic guide to git by travis swicegood   some rights reserved
Creating a Commit
     prompt> git commit -m “some great message”
     [master 600f084] some great message
      0 files changed, 0 insertions(+), 0 deletions(-)
      create mode 100644 README.rst
     … or use the editor …
     prompt> git commit



pragmatic guide to git by travis swicegood   some rights reserved
Git’s Editor?
     GIT_EDITOR                   <--   environment var
     core.editor                  <--   set with git config --global
     VISUAL                       <--   environment var
     EDITOR                       <--   environment var
     vi                           <--   when all else fails




pragmatic guide to git by travis swicegood                some rights reserved
Staging
               Changes              (Part II)
pragmatic guide to git by travis swicegood      some rights reserved
Adding an Existing File
     prompt> git add README.rst
     prompt> git status
     # On branch master
     # Changes to be committed:
     # (use "git rm --cached <file>..." to unstage)
     #
     # modified file: README.rst


pragmatic guide to git by travis swicegood   some rights reserved
Commit Existing File
     prompt> git commit -m “great message” 
               README.rst
     [master 3dc20b0] great message
      1 files changed, 1 insertions(+), 0 deletions(-)




pragmatic guide to git by travis swicegood   some rights reserved
Commit All Changes
     prompt> git commit -m “great message” -a
     [master be1b8dc] great message
      1 files changed, 1 insertions(+), 0 deletions(-)




pragmatic guide to git by travis swicegood   some rights reserved
Adding Part of a File
     prompt> git add -p README.rst
     … editor launches …




pragmatic guide to git by travis swicegood   some rights reserved
Undoing
                        Staged
                       Changes
pragmatic guide to git by travis swicegood   some rights reserved
Remove a Staged Change
     prompt> git reset HEAD README.rst
     M README.rst




pragmatic guide to git by travis swicegood   some rights reserved
Moving
                     Files
pragmatic guide to git by travis swicegood   some rights reserved
Moving a File
     prompt> git mv README.rst README.txt
     prompt> git status
     # On branch master
     # Changes to be committed:
     # (use "git reset HEAD <file>..." to unstage)
     #
     # renamed: README.rst -> README.txt


pragmatic guide to git by travis swicegood   some rights reserved
Deleting
                Files
pragmatic guide to git by travis swicegood   some rights reserved
Deleting a File
     prompt> git rm README.txt
     rm 'README.txt'
     prompt> git status
     # On branch master
     …
     # deleted: README.txt



pragmatic guide to git by travis swicegood   some rights reserved
Sharing
               Changes
pragmatic guide to git by travis swicegood   some rights reserved
Sharing
                       Changes
            (from 30,000 feet)
pragmatic guide to git by travis swicegood   some rights reserved
Sending Your Changes
     prompt> git push <remote> [<branch>]
     … example …
     prompt> git push origin master




pragmatic guide to git by travis swicegood   some rights reserved
Sending Your Changes
     prompt> git push <remote> [<branch>]
     … example …
     prompt> git push origin master




pragmatic guide to git by travis swicegood   some rights reserved
Grabbing Other’s Changes
     prompt> git pull <remote> [<branch>]
     … example …
     prompt> git pull tswicegood master




pragmatic guide to git by travis swicegood   some rights reserved
Told ya…
               30,000’
pragmatic guide to git by travis swicegood   some rights reserved
Branches
pragmatic guide to git by travis swicegood   some rights reserved
What’s a
               Branch?
pragmatic guide to git by travis swicegood   some rights reserved
Viewing
pragmatic guide to git by travis swicegood   some rights reserved
Viewing Branches
     prompt> git branch
     * master




pragmatic guide to git by travis swicegood   some rights reserved
Creating
pragmatic guide to git by travis swicegood   some rights reserved
Creating a New Branch
     prompt> git branch <new branch> [<existing>]
     … example …
     prompt> git branch new-branch
     prompt> git branch
     * master
       new-branch



pragmatic guide to git by travis swicegood   some rights reserved
Switching
pragmatic guide to git by travis swicegood   some rights reserved
Switching Branches
     prompt> git checkout new-branch
     Switched to branch 'new-branch'
     prompt> git branch
       master
     * new-branch




pragmatic guide to git by travis swicegood   some rights reserved
Create &
               Switch
pragmatic guide to git by travis swicegood   some rights reserved
Switching Branches
     prompt> git checkout -b newest-branch
     Switched to branch 'newest-branch'
     prompt> git branch
       master
       new-branch
     * newest-branch



pragmatic guide to git by travis swicegood   some rights reserved
Merging
pragmatic guide to git by travis swicegood   some rights reserved
Merging Branches
     prompt> git checkout master
     Switched to branch 'master'
     prompt> git merge newest-branch
     Updating 94f1967..a053b49
     Fast-forward
      0 files changed, 0 insertions(+), 0 deletions(-)
      create mode 100644 foo


pragmatic guide to git by travis swicegood   some rights reserved
Merging Branches
     prompt> git checkout master
     Switched to branch 'master'
     prompt> git merge newest-branch
     Updating 94f1967..a053b49
     Fast-forward
      0 files changed, 0 insertions(+), 0 deletions(-)
      create mode 100644 foo


pragmatic guide to git by travis swicegood   some rights reserved
Fast Forward
                                             newest-branch



                  master




pragmatic guide to git by travis swicegood         some rights reserved
Fast Forward
                                             newest-branch


                                             master




pragmatic guide to git by travis swicegood       some rights reserved
Merging Branches
     prompt> git merge new-branch
     Merge made by recursive.
      0 files changed, 0 insertions(+), 0 deletions(-)
      create mode 100644 bar




pragmatic guide to git by travis swicegood   some rights reserved
Merging Branches
     prompt> git merge new-branch
     Merge made by recursive.
      0 files changed, 0 insertions(+), 0 deletions(-)
      create mode 100644 bar




pragmatic guide to git by travis swicegood   some rights reserved
Recursive Merge
                                             new-branch



               master




pragmatic guide to git by travis swicegood         some rights reserved
Recursive Merge
                                             new-branch



               master




pragmatic guide to git by travis swicegood         some rights reserved
Rebasing
pragmatic guide to git by travis swicegood   some rights reserved
Rebasing Branches
     prompt> git checkout new-branch
     Switched to branch 'new-branch'
     prompt> git rebase master
     First, rewinding head to replay your work on
     top of it...
     Applying: …



pragmatic guide to git by travis swicegood   some rights reserved
Before Rebasing
                                             new-branch



               master




pragmatic guide to git by travis swicegood         some rights reserved
After Rebasing
                                             new-branch



               master




pragmatic guide to git by travis swicegood         some rights reserved
Rebasing Branches
     prompt> git checkout new-branch
     Switched to branch 'new-branch'
     prompt> git rebase master
     First, rewinding head to replay your work on
     top of it...
     Applying: …



pragmatic guide to git by travis swicegood   some rights reserved
Rebasing Branches
     prompt> git checkout new-branch
     Switched to branch 'new-branch'
     prompt> git rebase 1a3cdc2
     First, rewinding head to replay your work on
     top of it...
     Applying: …



pragmatic guide to git by travis swicegood   some rights reserved
Deleting
pragmatic guide to git by travis swicegood   some rights reserved
Deleting Branches
     prompt> git branch -d newest-branch
     Deleted branch newest-branch (was a053b49).




pragmatic guide to git by travis swicegood   some rights reserved
Not in Current Branch
                                             new-branch



               master




pragmatic guide to git by travis swicegood         some rights reserved
Really Deleting Branches
     prompt> git branch -D new-branch
     Deleted branch new-branch (was 1a3cdc2).




pragmatic guide to git by travis swicegood   some rights reserved
Really Deleting Branches
     prompt> git branch -D new-branch
     Deleted branch new-branch (was 1a3cdc2).




pragmatic guide to git by travis swicegood   some rights reserved
Team Work
pragmatic guide to git by travis swicegood   some rights reserved
Remote
       Repository
pragmatic guide to git by travis swicegood   some rights reserved
Remotes
pragmatic guide to git by travis swicegood   some rights reserved
Viewing Remotes
     prompt> git remote
     prompt>




pragmatic guide to git by travis swicegood   some rights reserved
Viewing Remotes
     prompt> cd /usr/local
     prompt> git remote
     homebrew
     roder
     tswicegood




pragmatic guide to git by travis swicegood   some rights reserved
Adding
pragmatic guide to git by travis swicegood   some rights reserved
Adding Remotes
     prompt> git remote add <remote> <url>
     … example …
     prompt> git remote add tswicegood 
       git://github.com/tswicegood/homebrew.git
     prompt> git remote
     tswicegood



pragmatic guide to git by travis swicegood   some rights reserved
Removing
pragmatic guide to git by travis swicegood   some rights reserved
Removing Remotes
     prompt> git remote rm <remote>
     … example …
     prompt> git remote rm tswicegood




pragmatic guide to git by travis swicegood   some rights reserved
Fetching
pragmatic guide to git by travis swicegood   some rights reserved
Fetching Changes
     prompt> git fetch <remote>
     … example …
     prompt> git fetch tswicegood
     remote: Counting objects: 3, done.
     … clipped …
      * [new branch] master -> tswicegood/master



pragmatic guide to git by travis swicegood   some rights reserved
Remote
            Branches
pragmatic guide to git by travis swicegood   some rights reserved
Remote Branches
     prompt> git branch -r
      tswicegood/master
     … or everything at once …
     prompt> git branch -a
      * master
        remotes/tswicegood/master



pragmatic guide to git by travis swicegood   some rights reserved
You Still
       Have to Merge
pragmatic guide to git by travis swicegood   some rights reserved
Pulling
pragmatic guide to git by travis swicegood   some rights reserved
Pulling Changes
     prompt> git pull <remote> <branch>
     … example …
     prompt> git pull tswicegood master
     … clipped …
      * branch     master     -> FETCH_HEAD
     Fast-forward
     … clipped …

pragmatic guide to git by travis swicegood   some rights reserved
Grokking Refspecs
     prompt> git pull <remote> <branch>
     … example …
     prompt> git pull tswicegood master
     … clipped …
      * branch     master     -> FETCH_HEAD
     Fast-forward
     … clipped …

pragmatic guide to git by travis swicegood   some rights reserved
Grokking Pull Refspecs
     prompt> git pull <remote> 
        <remote branch>:<local branch>
     … examples …
     prompt> git pull tswicegood master
     prompt> git pull tswicegood master:master
     prompt> git pull tswicegood dev:my-dev



pragmatic guide to git by travis swicegood   some rights reserved
Pulling
                    Part 2
pragmatic guide to git by travis swicegood   some rights reserved
Pulling Changes
     prompt> git pull --rebase <remote> <branch>
     … example …
     prompt> git pull --rebase tswicegood master
     … clipped …
      * branch        master  -> FETCH_HEAD
     First, rewinding head to replay your work on
     top of it... clipped …

pragmatic guide to git by travis swicegood   some rights reserved
Pushing
pragmatic guide to git by travis swicegood   some rights reserved
Pushing Changes
     prompt> git push <remote> <branch>
     … example …
     prompt> git push tswicegood master
     … clipped …
      * [new branch]    new-branch -> new-branch




pragmatic guide to git by travis swicegood   some rights reserved
Grokking Push Refspecs
     prompt> git push <remote> 
        <local branch>:<remote branch>
     … examples …
     prompt> git push tswicegood master
     prompt> git push tswicegood master:master
     prompt> git push tswicegood my-dev:dev



pragmatic guide to git by travis swicegood   some rights reserved
Team
            Workflow
pragmatic guide to git by travis swicegood   some rights reserved
Fully Distributed
        Designer Bob                         Developer Jane




                                       You



pragmatic guide to git by travis swicegood          some rights reserved
Fully Distributed
     Designer Bob                            Developer Jane




                                       You


pragmatic guide to git by travis swicegood         some rights reserved
Shared Model


      Designer Bob                     You   Developer Jane



pragmatic guide to git by travis swicegood           some rights reserved
Lots More
pragmatic guide to git by travis swicegood   some rights reserved
Several
                    Books
pragmatic guide to git by travis swicegood   some rights reserved
PragProg.com
pragmatic guide to git by travis swicegood   some rights reserved
git-scm.com
 #git (freenode)
pragmatic guide to git by travis swicegood   some rights reserved
Travis Swicegood
                       travisswicegood.com
                           @tswicegood
                       travis@domain51.com
                       http://joind.in/2855
pragmatic guide to git by travis swicegood    some rights reserved

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Git advanced
Git advancedGit advanced
Git advanced
 
Presentacion git
Presentacion gitPresentacion git
Presentacion git
 
Git introduction workshop for scientists
Git introduction workshop for scientists Git introduction workshop for scientists
Git introduction workshop for scientists
 
Git 101
Git 101Git 101
Git 101
 
Git & Github
Git & GithubGit & Github
Git & Github
 
Introduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training SessionIntroduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training Session
 
Web Programming - Git basics
Web Programming - Git basicsWeb Programming - Git basics
Web Programming - Git basics
 
Version control
Version controlVersion control
Version control
 
A Simple Introduction to Git
A Simple Introduction to GitA Simple Introduction to Git
A Simple Introduction to Git
 
Git commands
Git commandsGit commands
Git commands
 
Did you git yet?
Did you git yet?Did you git yet?
Did you git yet?
 
Git and github fundamentals
Git and github fundamentalsGit and github fundamentals
Git and github fundamentals
 
A Practical Introduction to git
A Practical Introduction to gitA Practical Introduction to git
A Practical Introduction to git
 
Version Control with Git
Version Control with GitVersion Control with Git
Version Control with Git
 
Contributing to open source using Git
Contributing to open source using GitContributing to open source using Git
Contributing to open source using Git
 
GIT | Distributed Version Control System
GIT | Distributed Version Control SystemGIT | Distributed Version Control System
GIT | Distributed Version Control System
 
Git presentation
Git presentationGit presentation
Git presentation
 
Git Tricks
Git TricksGit Tricks
Git Tricks
 
git and github
git and githubgit and github
git and github
 
Git Basics
Git BasicsGit Basics
Git Basics
 

Semelhante a Pragmatic Guide to Git

Introducción a git y GitHub
Introducción a git y GitHubIntroducción a git y GitHub
Introducción a git y GitHubLucas Videla
 
Sacándole jugo a git
Sacándole jugo a gitSacándole jugo a git
Sacándole jugo a gitBerny Cantos
 
Git Started With Git
Git Started With GitGit Started With Git
Git Started With GitNick Quaranto
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An IntroductionBehzad Altaf
 
Git Magic: Versioning Files like a Boss
Git Magic: Versioning Files like a BossGit Magic: Versioning Files like a Boss
Git Magic: Versioning Files like a Bosstmacwilliam
 
Introduction to Git for Artists
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for ArtistsDavid Newbury
 
Why Git Sucks and you'll use it anyways
Why Git Sucks and you'll use it anywaysWhy Git Sucks and you'll use it anyways
Why Git Sucks and you'll use it anywaysCarlos Taborda
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitE Carter
 
GTFO: Git Theory For OpenSource
GTFO: Git Theory For OpenSourceGTFO: Git Theory For OpenSource
GTFO: Git Theory For OpenSourceForest Mars
 
Pro git - grasping it conceptually
Pro git - grasping it conceptuallyPro git - grasping it conceptually
Pro git - grasping it conceptuallyseungzzang Kim
 
Git Distributed Version Control System
Git   Distributed Version Control SystemGit   Distributed Version Control System
Git Distributed Version Control SystemVictor Wong
 

Semelhante a Pragmatic Guide to Git (20)

Wokshop de Git
Wokshop de Git Wokshop de Git
Wokshop de Git
 
Introducción a git y GitHub
Introducción a git y GitHubIntroducción a git y GitHub
Introducción a git y GitHub
 
GIT_In_90_Minutes
GIT_In_90_MinutesGIT_In_90_Minutes
GIT_In_90_Minutes
 
Sacándole jugo a git
Sacándole jugo a gitSacándole jugo a git
Sacándole jugo a git
 
Loading...git
Loading...gitLoading...git
Loading...git
 
Working with Git
Working with GitWorking with Git
Working with Git
 
Git Started With Git
Git Started With GitGit Started With Git
Git Started With Git
 
Gittalk
GittalkGittalk
Gittalk
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An Introduction
 
GIT from n00b
GIT from n00bGIT from n00b
GIT from n00b
 
Git Magic: Versioning Files like a Boss
Git Magic: Versioning Files like a BossGit Magic: Versioning Files like a Boss
Git Magic: Versioning Files like a Boss
 
Introduction to Git for Artists
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for Artists
 
Why Git Sucks and you'll use it anyways
Why Git Sucks and you'll use it anywaysWhy Git Sucks and you'll use it anyways
Why Git Sucks and you'll use it anyways
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
 
GTFO: Git Theory For OpenSource
GTFO: Git Theory For OpenSourceGTFO: Git Theory For OpenSource
GTFO: Git Theory For OpenSource
 
Pro git - grasping it conceptually
Pro git - grasping it conceptuallyPro git - grasping it conceptually
Pro git - grasping it conceptually
 
Git
GitGit
Git
 
Git Distributed Version Control System
Git   Distributed Version Control SystemGit   Distributed Version Control System
Git Distributed Version Control System
 
Git and Github
Git and GithubGit and Github
Git and Github
 
Git & github
Git & githubGit & github
Git & github
 

Mais de ConFoo

Debugging applications with network security tools
Debugging applications with network security toolsDebugging applications with network security tools
Debugging applications with network security toolsConFoo
 
The business behind open source
The business behind open sourceThe business behind open source
The business behind open sourceConFoo
 
Security 202 - Are you sure your site is secure?
Security 202 - Are you sure your site is secure?Security 202 - Are you sure your site is secure?
Security 202 - Are you sure your site is secure?ConFoo
 
OWASP Enterprise Security API
OWASP Enterprise Security APIOWASP Enterprise Security API
OWASP Enterprise Security APIConFoo
 
Opensource Authentication and Authorization
Opensource Authentication and AuthorizationOpensource Authentication and Authorization
Opensource Authentication and AuthorizationConFoo
 
Introduction à la sécurité des WebServices
Introduction à la sécurité des WebServicesIntroduction à la sécurité des WebServices
Introduction à la sécurité des WebServicesConFoo
 
Le bon, la brute et le truand dans les nuages
Le bon, la brute et le truand dans les nuagesLe bon, la brute et le truand dans les nuages
Le bon, la brute et le truand dans les nuagesConFoo
 
The Solar Framework for PHP
The Solar Framework for PHPThe Solar Framework for PHP
The Solar Framework for PHPConFoo
 
Décrire un projet PHP dans des rapports
Décrire un projet PHP dans des rapportsDécrire un projet PHP dans des rapports
Décrire un projet PHP dans des rapportsConFoo
 
Server Administration in Python with Fabric, Cuisine and Watchdog
Server Administration in Python with Fabric, Cuisine and WatchdogServer Administration in Python with Fabric, Cuisine and Watchdog
Server Administration in Python with Fabric, Cuisine and WatchdogConFoo
 
Marrow: A Meta-Framework for Python 2.6+ and 3.1+
Marrow: A Meta-Framework for Python 2.6+ and 3.1+Marrow: A Meta-Framework for Python 2.6+ and 3.1+
Marrow: A Meta-Framework for Python 2.6+ and 3.1+ConFoo
 
Think Mobile First, Then Enhance
Think Mobile First, Then EnhanceThink Mobile First, Then Enhance
Think Mobile First, Then EnhanceConFoo
 
Metaprogramming in Ruby
Metaprogramming in RubyMetaprogramming in Ruby
Metaprogramming in RubyConFoo
 
Scalable Architecture 101
Scalable Architecture 101Scalable Architecture 101
Scalable Architecture 101ConFoo
 
As-t-on encore besoin d'un framework web ?
As-t-on encore besoin d'un framework web ?As-t-on encore besoin d'un framework web ?
As-t-on encore besoin d'un framework web ?ConFoo
 
Building servers with Node.js
Building servers with Node.jsBuilding servers with Node.js
Building servers with Node.jsConFoo
 
An Overview of Flash Storage for Databases
An Overview of Flash Storage for DatabasesAn Overview of Flash Storage for Databases
An Overview of Flash Storage for DatabasesConFoo
 
Android Jump Start
Android Jump StartAndroid Jump Start
Android Jump StartConFoo
 
Develop mobile applications with Flex
Develop mobile applications with FlexDevelop mobile applications with Flex
Develop mobile applications with FlexConFoo
 
WordPress pour le développement d'aplications web
WordPress pour le développement d'aplications webWordPress pour le développement d'aplications web
WordPress pour le développement d'aplications webConFoo
 

Mais de ConFoo (20)

Debugging applications with network security tools
Debugging applications with network security toolsDebugging applications with network security tools
Debugging applications with network security tools
 
The business behind open source
The business behind open sourceThe business behind open source
The business behind open source
 
Security 202 - Are you sure your site is secure?
Security 202 - Are you sure your site is secure?Security 202 - Are you sure your site is secure?
Security 202 - Are you sure your site is secure?
 
OWASP Enterprise Security API
OWASP Enterprise Security APIOWASP Enterprise Security API
OWASP Enterprise Security API
 
Opensource Authentication and Authorization
Opensource Authentication and AuthorizationOpensource Authentication and Authorization
Opensource Authentication and Authorization
 
Introduction à la sécurité des WebServices
Introduction à la sécurité des WebServicesIntroduction à la sécurité des WebServices
Introduction à la sécurité des WebServices
 
Le bon, la brute et le truand dans les nuages
Le bon, la brute et le truand dans les nuagesLe bon, la brute et le truand dans les nuages
Le bon, la brute et le truand dans les nuages
 
The Solar Framework for PHP
The Solar Framework for PHPThe Solar Framework for PHP
The Solar Framework for PHP
 
Décrire un projet PHP dans des rapports
Décrire un projet PHP dans des rapportsDécrire un projet PHP dans des rapports
Décrire un projet PHP dans des rapports
 
Server Administration in Python with Fabric, Cuisine and Watchdog
Server Administration in Python with Fabric, Cuisine and WatchdogServer Administration in Python with Fabric, Cuisine and Watchdog
Server Administration in Python with Fabric, Cuisine and Watchdog
 
Marrow: A Meta-Framework for Python 2.6+ and 3.1+
Marrow: A Meta-Framework for Python 2.6+ and 3.1+Marrow: A Meta-Framework for Python 2.6+ and 3.1+
Marrow: A Meta-Framework for Python 2.6+ and 3.1+
 
Think Mobile First, Then Enhance
Think Mobile First, Then EnhanceThink Mobile First, Then Enhance
Think Mobile First, Then Enhance
 
Metaprogramming in Ruby
Metaprogramming in RubyMetaprogramming in Ruby
Metaprogramming in Ruby
 
Scalable Architecture 101
Scalable Architecture 101Scalable Architecture 101
Scalable Architecture 101
 
As-t-on encore besoin d'un framework web ?
As-t-on encore besoin d'un framework web ?As-t-on encore besoin d'un framework web ?
As-t-on encore besoin d'un framework web ?
 
Building servers with Node.js
Building servers with Node.jsBuilding servers with Node.js
Building servers with Node.js
 
An Overview of Flash Storage for Databases
An Overview of Flash Storage for DatabasesAn Overview of Flash Storage for Databases
An Overview of Flash Storage for Databases
 
Android Jump Start
Android Jump StartAndroid Jump Start
Android Jump Start
 
Develop mobile applications with Flex
Develop mobile applications with FlexDevelop mobile applications with Flex
Develop mobile applications with Flex
 
WordPress pour le développement d'aplications web
WordPress pour le développement d'aplications webWordPress pour le développement d'aplications web
WordPress pour le développement d'aplications web
 

Último

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Último (20)

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Pragmatic Guide to Git

  • 1. Pragmatic Guide GIT Travis Swicegood #gittalk Licensed under Creative Commons, Attribution, Share-Alike
  • 2. #gittalk pragmatic guide to git by travis swicegood some rights reserved
  • 3. Hi, I’m Travis pragmatic guide to git by travis swicegood some rights reserved
  • 4. pragmatic guide to git by travis swicegood some rights reserved
  • 5. Git is Easy pragmatic guide to git by travis swicegood some rights reserved
  • 6. What’s this talk about? pragmatic guide to git by travis swicegood some rights reserved
  • 7. What this talk isn’t about? pragmatic guide to git by travis swicegood some rights reserved
  • 8. Contents pragmatic guide to git by travis swicegood some rights reserved
  • 9. Starting Out pragmatic guide to git by travis swicegood some rights reserved
  • 10. Daily Work pragmatic guide to git by travis swicegood some rights reserved
  • 11. Branches pragmatic guide to git by travis swicegood some rights reserved
  • 12. Team Work pragmatic guide to git by travis swicegood some rights reserved
  • 13. Glossary pragmatic guide to git by travis swicegood some rights reserved
  • 14. Starting Out pragmatic guide to git by travis swicegood some rights reserved
  • 15. Installation pragmatic guide to git by travis swicegood some rights reserved
  • 16. Installation–Compiling … download latest source from git-scm.com… prompt> make && make install … if you’re adventurous… prompt> make docs && make install-docs pragmatic guide to git by travis swicegood some rights reserved
  • 17. Installation–Ubuntu prompt> apt-get install git-core … optional … prompt> apt-get install git-doc git-svn pragmatic guide to git by travis swicegood some rights reserved
  • 18. Installation–Windows Cygwin: http://cygwin.org msysGit: http://code.google.com/p/msysgit/ pragmatic guide to git by travis swicegood some rights reserved
  • 19. Installation–OS X prompt> brew install git –OR– Git OS X Installer: http://code.google.com/p/git-osx-installer/ pragmatic guide to git by travis swicegood some rights reserved
  • 20. Verifying the Install prompt> git --version git version 1.7.3.2 pragmatic guide to git by travis swicegood some rights reserved
  • 21. My Version prompt> git --version git version 1.7.3.2 hub version 1.4.1 pragmatic guide to git by travis swicegood some rights reserved
  • 22. Getting Help pragmatic guide to git by travis swicegood some rights reserved
  • 23. Built-in Help prompt> git help prompt> git help <some command> prompt> open http://j.mp/gitdocs/ pragmatic guide to git by travis swicegood some rights reserved
  • 24. Configuration pragmatic guide to git by travis swicegood some rights reserved
  • 25. User & Email prompt> git config --global user.name “Travis Swicegood” prompt> git config --global user.email “travis@domain51.com” pragmatic guide to git by travis swicegood some rights reserved
  • 26. Colors prompt> git config --global color.ui auto pragmatic guide to git by travis swicegood some rights reserved
  • 27. Creating New Repositories pragmatic guide to git by travis swicegood some rights reserved
  • 28. Repository pragmatic guide to git by travis swicegood some rights reserved
  • 29. Commit pragmatic guide to git by travis swicegood some rights reserved
  • 30. Initialization prompt> git init … example … prompt> mkdir /work/some-repo prompt> cd /work/some-repo prompt> git init pragmatic guide to git by travis swicegood some rights reserved
  • 31. Working Tree pragmatic guide to git by travis swicegood some rights reserved
  • 32. Cloning New Repositories pragmatic guide to git by travis swicegood some rights reserved
  • 33. Cloning prompt> git clone <some repo> … example … prompt> git clone git://github.com/tswicegood/bobby-tables.git prompt> cd bobby-tables pragmatic guide to git by travis swicegood some rights reserved
  • 34. Cloning prompt> git clone <some repo> … example … prompt> git clone git://github.com/tswicegood/bobby-tables.git prompt> cd bobby-tables pragmatic guide to git by travis swicegood some rights reserved
  • 35. Daily Work pragmatic guide to git by travis swicegood some rights reserved
  • 36. Seeing What’s Changed pragmatic guide to git by travis swicegood some rights reserved
  • 37. Status prompt> git status … example … prompt> git status # On branch master nothing to commit (working directory clean) pragmatic guide to git by travis swicegood some rights reserved
  • 38. Staging Changes pragmatic guide to git by travis swicegood some rights reserved
  • 39. Index pragmatic guide to git by travis swicegood some rights reserved
  • 40. (aka) Staging Area pragmatic guide to git by travis swicegood some rights reserved
  • 41. Adding a New File prompt> git status # On branch master # Untracked files: # (use "git add <file>..." to include in what… # # README.rst pragmatic guide to git by travis swicegood some rights reserved
  • 42. Adding a New File prompt> git add README.rst prompt> git status # On branch master # Changes to be committed: # (use "git rm --cached <file>..." to unstage) # # new file: README.rst pragmatic guide to git by travis swicegood some rights reserved
  • 43. Committing Changes pragmatic guide to git by travis swicegood some rights reserved
  • 44. Creating a Commit prompt> git commit -m “some great message” [master 600f084] some great message 0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 README.rst pragmatic guide to git by travis swicegood some rights reserved
  • 45. Creating a Commit prompt> git commit -m “some great message” [master 600f084] some great message 0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 README.rst pragmatic guide to git by travis swicegood some rights reserved
  • 46. Creating a Commit prompt> git commit -m “some great message” [master 600f084] some great message 0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 README.rst pragmatic guide to git by travis swicegood some rights reserved
  • 47. Creating a Commit prompt> git commit -m “some great message” [master 600f084] some great message 0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 README.rst … or use the editor … prompt> git commit pragmatic guide to git by travis swicegood some rights reserved
  • 48. Git’s Editor? GIT_EDITOR <-- environment var core.editor <-- set with git config --global VISUAL <-- environment var EDITOR <-- environment var vi <-- when all else fails pragmatic guide to git by travis swicegood some rights reserved
  • 49. Staging Changes (Part II) pragmatic guide to git by travis swicegood some rights reserved
  • 50. Adding an Existing File prompt> git add README.rst prompt> git status # On branch master # Changes to be committed: # (use "git rm --cached <file>..." to unstage) # # modified file: README.rst pragmatic guide to git by travis swicegood some rights reserved
  • 51. Commit Existing File prompt> git commit -m “great message” README.rst [master 3dc20b0] great message 1 files changed, 1 insertions(+), 0 deletions(-) pragmatic guide to git by travis swicegood some rights reserved
  • 52. Commit All Changes prompt> git commit -m “great message” -a [master be1b8dc] great message 1 files changed, 1 insertions(+), 0 deletions(-) pragmatic guide to git by travis swicegood some rights reserved
  • 53. Adding Part of a File prompt> git add -p README.rst … editor launches … pragmatic guide to git by travis swicegood some rights reserved
  • 54. Undoing Staged Changes pragmatic guide to git by travis swicegood some rights reserved
  • 55. Remove a Staged Change prompt> git reset HEAD README.rst M README.rst pragmatic guide to git by travis swicegood some rights reserved
  • 56. Moving Files pragmatic guide to git by travis swicegood some rights reserved
  • 57. Moving a File prompt> git mv README.rst README.txt prompt> git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # renamed: README.rst -> README.txt pragmatic guide to git by travis swicegood some rights reserved
  • 58. Deleting Files pragmatic guide to git by travis swicegood some rights reserved
  • 59. Deleting a File prompt> git rm README.txt rm 'README.txt' prompt> git status # On branch master … # deleted: README.txt pragmatic guide to git by travis swicegood some rights reserved
  • 60. Sharing Changes pragmatic guide to git by travis swicegood some rights reserved
  • 61. Sharing Changes (from 30,000 feet) pragmatic guide to git by travis swicegood some rights reserved
  • 62. Sending Your Changes prompt> git push <remote> [<branch>] … example … prompt> git push origin master pragmatic guide to git by travis swicegood some rights reserved
  • 63. Sending Your Changes prompt> git push <remote> [<branch>] … example … prompt> git push origin master pragmatic guide to git by travis swicegood some rights reserved
  • 64. Grabbing Other’s Changes prompt> git pull <remote> [<branch>] … example … prompt> git pull tswicegood master pragmatic guide to git by travis swicegood some rights reserved
  • 65. Told ya… 30,000’ pragmatic guide to git by travis swicegood some rights reserved
  • 66. Branches pragmatic guide to git by travis swicegood some rights reserved
  • 67. What’s a Branch? pragmatic guide to git by travis swicegood some rights reserved
  • 68. Viewing pragmatic guide to git by travis swicegood some rights reserved
  • 69. Viewing Branches prompt> git branch * master pragmatic guide to git by travis swicegood some rights reserved
  • 70. Creating pragmatic guide to git by travis swicegood some rights reserved
  • 71. Creating a New Branch prompt> git branch <new branch> [<existing>] … example … prompt> git branch new-branch prompt> git branch * master new-branch pragmatic guide to git by travis swicegood some rights reserved
  • 72. Switching pragmatic guide to git by travis swicegood some rights reserved
  • 73. Switching Branches prompt> git checkout new-branch Switched to branch 'new-branch' prompt> git branch master * new-branch pragmatic guide to git by travis swicegood some rights reserved
  • 74. Create & Switch pragmatic guide to git by travis swicegood some rights reserved
  • 75. Switching Branches prompt> git checkout -b newest-branch Switched to branch 'newest-branch' prompt> git branch master new-branch * newest-branch pragmatic guide to git by travis swicegood some rights reserved
  • 76. Merging pragmatic guide to git by travis swicegood some rights reserved
  • 77. Merging Branches prompt> git checkout master Switched to branch 'master' prompt> git merge newest-branch Updating 94f1967..a053b49 Fast-forward 0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 foo pragmatic guide to git by travis swicegood some rights reserved
  • 78. Merging Branches prompt> git checkout master Switched to branch 'master' prompt> git merge newest-branch Updating 94f1967..a053b49 Fast-forward 0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 foo pragmatic guide to git by travis swicegood some rights reserved
  • 79. Fast Forward newest-branch master pragmatic guide to git by travis swicegood some rights reserved
  • 80. Fast Forward newest-branch master pragmatic guide to git by travis swicegood some rights reserved
  • 81. Merging Branches prompt> git merge new-branch Merge made by recursive. 0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 bar pragmatic guide to git by travis swicegood some rights reserved
  • 82. Merging Branches prompt> git merge new-branch Merge made by recursive. 0 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 bar pragmatic guide to git by travis swicegood some rights reserved
  • 83. Recursive Merge new-branch master pragmatic guide to git by travis swicegood some rights reserved
  • 84. Recursive Merge new-branch master pragmatic guide to git by travis swicegood some rights reserved
  • 85. Rebasing pragmatic guide to git by travis swicegood some rights reserved
  • 86. Rebasing Branches prompt> git checkout new-branch Switched to branch 'new-branch' prompt> git rebase master First, rewinding head to replay your work on top of it... Applying: … pragmatic guide to git by travis swicegood some rights reserved
  • 87. Before Rebasing new-branch master pragmatic guide to git by travis swicegood some rights reserved
  • 88. After Rebasing new-branch master pragmatic guide to git by travis swicegood some rights reserved
  • 89. Rebasing Branches prompt> git checkout new-branch Switched to branch 'new-branch' prompt> git rebase master First, rewinding head to replay your work on top of it... Applying: … pragmatic guide to git by travis swicegood some rights reserved
  • 90. Rebasing Branches prompt> git checkout new-branch Switched to branch 'new-branch' prompt> git rebase 1a3cdc2 First, rewinding head to replay your work on top of it... Applying: … pragmatic guide to git by travis swicegood some rights reserved
  • 91. Deleting pragmatic guide to git by travis swicegood some rights reserved
  • 92. Deleting Branches prompt> git branch -d newest-branch Deleted branch newest-branch (was a053b49). pragmatic guide to git by travis swicegood some rights reserved
  • 93. Not in Current Branch new-branch master pragmatic guide to git by travis swicegood some rights reserved
  • 94. Really Deleting Branches prompt> git branch -D new-branch Deleted branch new-branch (was 1a3cdc2). pragmatic guide to git by travis swicegood some rights reserved
  • 95. Really Deleting Branches prompt> git branch -D new-branch Deleted branch new-branch (was 1a3cdc2). pragmatic guide to git by travis swicegood some rights reserved
  • 96. Team Work pragmatic guide to git by travis swicegood some rights reserved
  • 97. Remote Repository pragmatic guide to git by travis swicegood some rights reserved
  • 98. Remotes pragmatic guide to git by travis swicegood some rights reserved
  • 99. Viewing Remotes prompt> git remote prompt> pragmatic guide to git by travis swicegood some rights reserved
  • 100. Viewing Remotes prompt> cd /usr/local prompt> git remote homebrew roder tswicegood pragmatic guide to git by travis swicegood some rights reserved
  • 101. Adding pragmatic guide to git by travis swicegood some rights reserved
  • 102. Adding Remotes prompt> git remote add <remote> <url> … example … prompt> git remote add tswicegood git://github.com/tswicegood/homebrew.git prompt> git remote tswicegood pragmatic guide to git by travis swicegood some rights reserved
  • 103. Removing pragmatic guide to git by travis swicegood some rights reserved
  • 104. Removing Remotes prompt> git remote rm <remote> … example … prompt> git remote rm tswicegood pragmatic guide to git by travis swicegood some rights reserved
  • 105. Fetching pragmatic guide to git by travis swicegood some rights reserved
  • 106. Fetching Changes prompt> git fetch <remote> … example … prompt> git fetch tswicegood remote: Counting objects: 3, done. … clipped … * [new branch] master -> tswicegood/master pragmatic guide to git by travis swicegood some rights reserved
  • 107. Remote Branches pragmatic guide to git by travis swicegood some rights reserved
  • 108. Remote Branches prompt> git branch -r tswicegood/master … or everything at once … prompt> git branch -a * master remotes/tswicegood/master pragmatic guide to git by travis swicegood some rights reserved
  • 109. You Still Have to Merge pragmatic guide to git by travis swicegood some rights reserved
  • 110. Pulling pragmatic guide to git by travis swicegood some rights reserved
  • 111. Pulling Changes prompt> git pull <remote> <branch> … example … prompt> git pull tswicegood master … clipped … * branch master -> FETCH_HEAD Fast-forward … clipped … pragmatic guide to git by travis swicegood some rights reserved
  • 112. Grokking Refspecs prompt> git pull <remote> <branch> … example … prompt> git pull tswicegood master … clipped … * branch master -> FETCH_HEAD Fast-forward … clipped … pragmatic guide to git by travis swicegood some rights reserved
  • 113. Grokking Pull Refspecs prompt> git pull <remote> <remote branch>:<local branch> … examples … prompt> git pull tswicegood master prompt> git pull tswicegood master:master prompt> git pull tswicegood dev:my-dev pragmatic guide to git by travis swicegood some rights reserved
  • 114. Pulling Part 2 pragmatic guide to git by travis swicegood some rights reserved
  • 115. Pulling Changes prompt> git pull --rebase <remote> <branch> … example … prompt> git pull --rebase tswicegood master … clipped … * branch master -> FETCH_HEAD First, rewinding head to replay your work on top of it... clipped … pragmatic guide to git by travis swicegood some rights reserved
  • 116. Pushing pragmatic guide to git by travis swicegood some rights reserved
  • 117. Pushing Changes prompt> git push <remote> <branch> … example … prompt> git push tswicegood master … clipped … * [new branch] new-branch -> new-branch pragmatic guide to git by travis swicegood some rights reserved
  • 118. Grokking Push Refspecs prompt> git push <remote> <local branch>:<remote branch> … examples … prompt> git push tswicegood master prompt> git push tswicegood master:master prompt> git push tswicegood my-dev:dev pragmatic guide to git by travis swicegood some rights reserved
  • 119. Team Workflow pragmatic guide to git by travis swicegood some rights reserved
  • 120. Fully Distributed Designer Bob Developer Jane You pragmatic guide to git by travis swicegood some rights reserved
  • 121. Fully Distributed Designer Bob Developer Jane You pragmatic guide to git by travis swicegood some rights reserved
  • 122. Shared Model Designer Bob You Developer Jane pragmatic guide to git by travis swicegood some rights reserved
  • 123. Lots More pragmatic guide to git by travis swicegood some rights reserved
  • 124. Several Books pragmatic guide to git by travis swicegood some rights reserved
  • 125. PragProg.com pragmatic guide to git by travis swicegood some rights reserved
  • 126. git-scm.com #git (freenode) pragmatic guide to git by travis swicegood some rights reserved
  • 127. Travis Swicegood travisswicegood.com @tswicegood travis@domain51.com http://joind.in/2855 pragmatic guide to git by travis swicegood some rights reserved