Your SlideShare is downloading. ×
0
Git
An intro to Git Source Control Management
Say what?
Source Control Management
like SVN, CVS,.. but better!
Linus Throvalds (april 2005)
Linux Kernel
Junio Hamano (j...
Ok, but why?
Offline
Distributed
Branching
Because it’s fucking fast, that’s why!
How git works     Offline

  world




                local
How git works       Distributed

   server


                           local




            local          local
How git works                   Branching

                      feature            commit


master   commit              ...
Repository

unstaged


    git add <files>


                           local                  remote
 staged
             ...
Our Workflow
git checkout -b cool_feature
do some fun code stuff, drink a mojito
git fetch master
git rebase origin/master
...
Useful commands and files
             ‣ repository setup
git init
             ‣ add files to queue for next commit
git add...
Cool features
Uhm.. Okay...
Cool features                            stash
 do some cool stuff
 git stash
 fix an irritating bug
 git commit -a -m “Far...
Cool features                            rebase
    fetch changes from another branch



                            featu...
Cool features                              rebase
    fetch changes from another branch

                                 ...
Cool features                                  bisect
 Find the code change that introduced a bug


                      ...
Cool features                         cherry-pick
 Apply a change from another commit into current branch


              ...
GitNub
Git vs SVN
           Git                      SVN

      Distributed             Single Repository

       Branches      ...
git-svn
 using git local if you have a remote svn repository
   use git on your local machine
     staging
     seperate c...
Q&A
Useful resources
http://www.kernel.org/pub/software/scm/git/docs/
http://peepcode.com/products/git
https://github.com/
htt...
About us


     Jeroen Jacobs & Jan De Poorter
     @jeroen_j & @defv
     Openminds
Upcoming SlideShare
Loading in...5
×

Git

1,256

Published on

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,256
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
38
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Transcript of "Git"

  1. 1. Git An intro to Git Source Control Management
  2. 2. Say what? Source Control Management like SVN, CVS,.. but better! Linus Throvalds (april 2005) Linux Kernel Junio Hamano (july 2005) a stupid person!
  3. 3. Ok, but why? Offline Distributed Branching Because it’s fucking fast, that’s why!
  4. 4. How git works Offline world local
  5. 5. How git works Distributed server local local local
  6. 6. How git works Branching feature commit master commit merge commit commit feature commit commit
  7. 7. Repository unstaged git add <files> local remote staged repository repository git commit git push
  8. 8. Our Workflow git checkout -b cool_feature do some fun code stuff, drink a mojito git fetch master git rebase origin/master git checkout master git merge cool_feature
  9. 9. Useful commands and files ‣ repository setup git init ‣ add files to queue for next commit git add ‣ commit queued files git commit ‣ push commit(s) to remote repository git push ‣ fetch changes from remote repository git pull ‣ clone repository into a local directory git clone ‣ ignore specific files by adding them here .gitignore
  10. 10. Cool features Uhm.. Okay...
  11. 11. Cool features stash do some cool stuff git stash fix an irritating bug git commit -a -m “Farewell, you bug!” git stash apply do some more cool stuff
  12. 12. Cool features rebase fetch changes from another branch feature commit 3 master commit 1 commit 2 commit 4
  13. 13. Cool features rebase fetch changes from another branch 1234 commit 3 feature master commit 1 commit 2 commit 4 124
  14. 14. Cool features bisect Find the code change that introduced a bug ‣ start bisect session git bisect start ‣ mark current revision as bad git bisect bad ‣ search a working revision git log ‣ mark the working one as good git bisect good revision ‣ bisect until you find the bug git bisect good/bad
  15. 15. Cool features cherry-pick Apply a change from another commit into current branch ‣ search the right commit git log ‣ checkout the branch you want git checkout branch ‣ apply commit into branch git cherry-pick revision
  16. 16. GitNub
  17. 17. Git vs SVN Git SVN Distributed Single Repository Branches partial checkout Performance Access Control Repository size Shorter revision numbers Powerful, more GUI tools little more complicated
  18. 18. git-svn using git local if you have a remote svn repository use git on your local machine staging seperate commits branches push your commits to your svn repository
  19. 19. Q&A
  20. 20. Useful resources http://www.kernel.org/pub/software/scm/git/docs/ http://peepcode.com/products/git https://github.com/ http://github.com/Caged/gitnub/tree/master http://git.or.cz/gitwiki/GitSvnComparsion
  21. 21. About us Jeroen Jacobs & Jan De Poorter @jeroen_j & @defv Openminds
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×