Introduction To Git
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
3,279
On Slideshare
3,071
From Embeds
208
Number of Embeds
6

Actions

Shares
Downloads
112
Comments
0
Likes
9

Embeds 208

http://endroid.blogspot.com 194
http://endroid.blogspot.tw 7
http://www.linkedin.com 3
https://www.linkedin.com 2
http://www.slideshare.net 1
http://endroid.blogspot.com.au 1

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide





















































































Transcript

  • 1. Introduction to GIT Boby - Thenetcircle 2010
  • 2. Plan • Basics • Workflow • Roadmap
  • 3. Basics • What is GIT? • How does it work? • Why shall i use GIT?
  • 4. What is GIT? • Version control system • Distributed • Modern • Created by Linus Torvald
  • 5. Distributed? • No central repository • Mostly local • Remote access u1 u3 Central u2 u1 u2 u3 u4
  • 6. Modern • Fast • Clean • Rethink of VCS
  • 7. Usage • Linux kernel • Symfony 2 • asOauthPlugin • Many others on github, gitorious...
  • 8. How? • Key-value storage • File based • Checksum via SHA-1 • Inside the .git folder
  • 9. How? http://progit.org/book/ch1-3.html
  • 10. How? http://progit.org/book/ch1-3.html
  • 11. How? • Commits are snapshots • Modified files are copied • Unmodified files keep the same reference
  • 12. How? Head Head Change file B Rev 3AB40 Commit changes Rev 98FD0 Folder 290FF Folder 290FF File A 343BA File A 343BA File B FF0934 File B 5589A
  • 13. What about SVN? • Old, slow, complex • Merges are a pain!!! • Merges suck!!!
  • 14. What about others? • Mercurial, Bazaar... all distributed VCS • The rest (VSS, CVS...)
  • 15. Basic workflow • Initialize a repository • Adding a file
  • 16. Basic workflow • Modifying a file • Viewing the difference • Committing
  • 17. What is this add crap? • The “index” !!! • Another step in the workflow • Act as staging area
  • 18. Basic workflow http://marklodato.github.com/visual-git-guide/
  • 19. Basic workflow • Make 2 modifications on the same file • Commit the first one • Commit the second one
  • 20. Branch workflow • Create a new branch • Modify some stuff • Commit in this branch
  • 21. Branch workflow • Merge my new branch back to main • Commit
  • 22. Branch workflow • Modify branch test • Modify branch master • Merge • Solve conflict
  • 23. Branch workflow • Modify branch test • Modify branch master • Update test from master
  • 24. Branch workflow Master Branch test Branch Rev 3AB40 Rev 3AB40 Rev AE449 Rev 34E79 Rev CC34F
  • 25. Branch workflow Master Branch test Rev 3AB40 Rev 3AB40 Rev AE449 Rev AE449 Rebase Rev CC34F Rev CC34F Rev 34E79
  • 26. Update your branch from the main =
  • 27. “git rebase main” =
  • 28. 2 seconds =
  • 29. Holly crap!!! Awesome!!! Bye bye SVN!!!
  • 30. Remote workflow • Checkout a remote branch • Modify • Send the modification to the remote
  • 31. External workflow • git submodule: - longer workflow - allows direct co/push • git subtree • external dependency manager
  • 32. Dev workflow • Clone the main branch • Create branch for feature • Commit changes inside • Rebase often to keep the branch up to date • Push back • Tell the maintainer to merge your changes
  • 33. Main repo } master git clone git pull git merge git pull remote server Boby repo git checkout -b Boby repo master eflower feat } git clone git pull git push git rebase local Working copy eflower feat
  • 34. Roadmap • Install git • Training • Transition with git-svn • Move all branches/script to git • End of SVN • Enjoy!
  • 35. Installation? • Version 1.7 of GIT • CLI • tortoise git for designer • Remote repository with Gitorious
  • 36. Links • http://progit.org/book/ • http://marklodato.github.com/visual-git-guide/ • http://hginit.com/ • http://git.or.cz/course/svn.html
  • 37. Questions?