git
DESCRIPTION
TRANSCRIPT
![Page 1: Git](https://reader037.vdocuments.net/reader037/viewer/2022100211/54068f508d7f7288088b460b/html5/thumbnails/1.jpg)
GIT SCM
![Page 2: Git](https://reader037.vdocuments.net/reader037/viewer/2022100211/54068f508d7f7288088b460b/html5/thumbnails/2.jpg)
Contents
• Popularity– Projects that use/require Git
• Functionality– Distributed repository– Branching/merging
• Learning• Resources required• Support by 3rd party tools• Summary
![Page 3: Git](https://reader037.vdocuments.net/reader037/viewer/2022100211/54068f508d7f7288088b460b/html5/thumbnails/3.jpg)
Git vs SVN on Google Trends
![Page 4: Git](https://reader037.vdocuments.net/reader037/viewer/2022100211/54068f508d7f7288088b460b/html5/thumbnails/4.jpg)
GitHub vs SourceForge on Google Trends
![Page 5: Git](https://reader037.vdocuments.net/reader037/viewer/2022100211/54068f508d7f7288088b460b/html5/thumbnails/5.jpg)
Projects that use Git
• Linux kernel• Ruby on Rails• jQuery• node.js• Twitter bootstrap• Diaspora SN• Symfony (requires it!)• Facebook OS projects
• less.js• Elastic search• Eclipse• Gnome• KDE• Qt• Android (!!!)• Stanford/Berkley in
their learning courses
![Page 6: Git](https://reader037.vdocuments.net/reader037/viewer/2022100211/54068f508d7f7288088b460b/html5/thumbnails/6.jpg)
Git Concepts
• Local Repository(just type git init, or right click…)
• Commit• Push/pull• Origin ( the place you took the source from)• Tags ( real tags, no space required, made
effortlessly)• Branches (actual branches, not copies of code)
![Page 7: Git](https://reader037.vdocuments.net/reader037/viewer/2022100211/54068f508d7f7288088b460b/html5/thumbnails/7.jpg)
Distributed vs Centralized
![Page 8: Git](https://reader037.vdocuments.net/reader037/viewer/2022100211/54068f508d7f7288088b460b/html5/thumbnails/8.jpg)
But, you can use Git as a centralized repository as well
Can have local
branches
Team branches(feature,
release, maintenance)
![Page 9: Git](https://reader037.vdocuments.net/reader037/viewer/2022100211/54068f508d7f7288088b460b/html5/thumbnails/9.jpg)
Pros• Git is incredibly faster than SVN cause nearly all operations other
than push and pull work locally• Uses compression when storing/sending code over network. As a
result pull/clone/push happen a lot faster.• Preserves the actual author of the code during merge• Allows simultaneous storage of several branches in a single folder• Allows offline commits• Branches know where they came from. Merging them is a piece of
cake• Does not pollute your repo by creating stupid .svn folders in each
folder
![Page 10: Git](https://reader037.vdocuments.net/reader037/viewer/2022100211/54068f508d7f7288088b460b/html5/thumbnails/10.jpg)
Pros continued• Git repos are much smaller than SVN’s (30x smaller in
case of Mozilla project)• Git branches are simpler and less resource heavy than
SVN's• Git allows you to execute hooks on some events(commit,
push, pull)• Allows commit amend (fix your last commit)• Requires the damned comment thing• To be sure that you won’t loose some code you can just
commit it locally instead of copying the files• Ignoring files is easier
![Page 11: Git](https://reader037.vdocuments.net/reader037/viewer/2022100211/54068f508d7f7288088b460b/html5/thumbnails/11.jpg)
What people will learn when working with git
• A more modern way to do SCM• They will learn to actually do branching. It won’t be
a pain in the ass• They would be forced to type in the damned
comment when committing. The thing’s important.• They won’t have to learn it anyway when they
finally encounter it in the wild (symfony2)• Anyone who knows git can handle SVN anytime• Contributing
![Page 12: Git](https://reader037.vdocuments.net/reader037/viewer/2022100211/54068f508d7f7288088b460b/html5/thumbnails/12.jpg)
Cons
• Steep learning curve• Some UI tools do not yet fully support Git• Is harder to configure on client machine ( at
least it was a year ago )• It is impossible to checkout a portion of the
project tree (???)• Cumbersome revision numbers
![Page 13: Git](https://reader037.vdocuments.net/reader037/viewer/2022100211/54068f508d7f7288088b460b/html5/thumbnails/13.jpg)
Git performance
![Page 14: Git](https://reader037.vdocuments.net/reader037/viewer/2022100211/54068f508d7f7288088b460b/html5/thumbnails/14.jpg)
Git Branching?
• Tracks the project revision the branch started from• Records branch merge events (author, time, date,
branch revision info)• Changes made on the branches remain attributed
to original authors• Changes made during the merging process are
attributed to the merging user• Automatically starts the next merge at the last
merge (a branch can be merged twice)
![Page 15: Git](https://reader037.vdocuments.net/reader037/viewer/2022100211/54068f508d7f7288088b460b/html5/thumbnails/15.jpg)
Possible Branching Model
![Page 16: Git](https://reader037.vdocuments.net/reader037/viewer/2022100211/54068f508d7f7288088b460b/html5/thumbnails/16.jpg)
Resources RequiredSVN Git
• Centralized server• Client software• TortoiseSVN• IDE/plugin• Command line
SVN client
• Centralized server• Client software• TortoiseGit• IDE/plugin• Command line git
client• SmartGit if none
of the above suits
![Page 17: Git](https://reader037.vdocuments.net/reader037/viewer/2022100211/54068f508d7f7288088b460b/html5/thumbnails/17.jpg)
Setup on windows
• mysysgit port of git to windows• Public/private certificates on each user
machine for auth• TortoiseGit (so one will have lovely icons on git
managed folders)• SmartGit looks like the best UI tool (I haven’t
tried eclipse built-in git plugin)
![Page 18: Git](https://reader037.vdocuments.net/reader037/viewer/2022100211/54068f508d7f7288088b460b/html5/thumbnails/18.jpg)
Tools
• TortoiseGit• Command line utility• SmartGit• Eclipse git plugin ( EGit )• Git source control provider for Visual Studio
![Page 19: Git](https://reader037.vdocuments.net/reader037/viewer/2022100211/54068f508d7f7288088b460b/html5/thumbnails/19.jpg)
Resources
• A successful Git branching model http://goo.gl/b1EA7
• Good Git cheatsheet http://goo.gl/vUSlV• Git website http://goo.gl/D3sxy