Download - Git - Intro to the Basics of DVCS
![Page 1: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/1.jpg)
The Git source code control system
Dueling Coders
by Matthew McCullough & Tim Berglund
![Page 2: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/2.jpg)
SVN Git
![Page 3: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/3.jpg)
Why Another?
Not just for versioning source
Distributed Version Control Systems (DVCS)
Value of centralized + decentralized
Easy merging from many branches
Doesn’t pollute
100,000 artifacts
![Page 4: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/4.jpg)
Git Going
![Page 5: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/5.jpg)
Getting Git
• Cygwin
• MacPorts
• Distro-specific package manager
• Binaries
![Page 7: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/7.jpg)
URL Styles
• Public Clone URL (Git Protocol)git://github.com/matthewmccullough/helloworld.git
• Private Clone Path (SSH Protocol)[email protected]:matthewmccullough/helloworld.git
• Filesystem Path/users/mccm06/projects/helloworld.git
![Page 8: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/8.jpg)
Cloning Repos
• Command to retrieve a remote repo
• Works against Git and SVN
![Page 9: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/9.jpg)
IDE Tools
• EGit, Eclipse Plugin Update Sitehttp://www.jgit.org/update-sitehttp://github.com/guides/using-the-egit-eclipse-plugin-with-github
• Git4IdeaGet via plugins menu
• Netbeanshttp://git.or.cz/gitwiki/NetBeansPlugin
![Page 10: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/10.jpg)
Sharing Repos
![Page 11: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/11.jpg)
Serve
git help daemon
![Page 12: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/12.jpg)
Serve
git daemon --export-all --base-path=.
![Page 13: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/13.jpg)
Free Git Hosting
Githubhttp://github.com
Gitorioushttp://gitorious.org
![Page 14: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/14.jpg)
Sharing Demo
![Page 15: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/15.jpg)
Add, Checkin
git add *.java
git commit -m‘Did some work’
![Page 16: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/16.jpg)
Switch Branch, Checkout
git branch ANEWBRANCH
git checkout ANEWBRANCH
![Page 17: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/17.jpg)
Push
git push origin master
![Page 18: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/18.jpg)
Pull
git pull origin master
![Page 19: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/19.jpg)
Branching
![Page 20: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/20.jpg)
Just Branches?
Core idea of DVCS
Same as always, but less painful
Branches are local
Branch for every feature
Main is for generals
![Page 21: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/21.jpg)
Branching Demo
![Page 22: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/22.jpg)
Merge
git merge ANEWBRANCH(destination = current branch)
![Page 23: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/23.jpg)
Conflicts
![Page 24: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/24.jpg)
Squash
git merge --squash ANEWBRANCH(destination = current branch)
![Page 25: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/25.jpg)
Tag
git tag VERSION1.0
![Page 26: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/26.jpg)
Cherry Pick
git cherry-pick -r e8ac5ed693(destination = current branch)
![Page 27: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/27.jpg)
Resources
![Page 28: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/28.jpg)
Documentation
• Wiki has the most up to date info.http://git.or.cz/gitwiki/InterfacesFrontendsAndTools
![Page 29: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/29.jpg)
How To Guides
• http://github.com/guides/home
![Page 30: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/30.jpg)
Quick Reference
• http://zrusin.blogspot.com/2007/09/git-cheat-sheet.html
![Page 31: Git - Intro to the Basics of DVCS](https://reader030.vdocument.in/reader030/viewer/2022020105/55508815b4c905a85c8b4b4d/html5/thumbnails/31.jpg)
Q&A