Why Git
-
Upload
mark-guzman -
Category
Technology
-
view
3.293 -
download
1
description
Transcript of Why Git
![Page 1: Why Git](https://reader034.fdocuments.in/reader034/viewer/2022050807/540690d28d7f7288088b460d/html5/thumbnails/1.jpg)
Why Git?A quick trip down the Git rabbit hole.
Mark [email protected] @segy http://hasno.info
Thursday, March 4, 2010
![Page 2: Why Git](https://reader034.fdocuments.in/reader034/viewer/2022050807/540690d28d7f7288088b460d/html5/thumbnails/2.jpg)
What is Git
Distributed Version Control
Fast (small C core)
Popular (Github)
Stupid Content Tracker
Thursday, March 4, 2010
![Page 3: Why Git](https://reader034.fdocuments.in/reader034/viewer/2022050807/540690d28d7f7288088b460d/html5/thumbnails/3.jpg)
Benefits
Easier Merging
Cheap fast branching
Speed
Checkout size
Maintains an easily usable history
Redundancy by default
Thursday, March 4, 2010
![Page 4: Why Git](https://reader034.fdocuments.in/reader034/viewer/2022050807/540690d28d7f7288088b460d/html5/thumbnails/4.jpg)
Why Merging Tracking MattersHistory Matters
Why did Bob change 10 files in his branch 3 weeks back?
Why did you change some of the same files in yours?
How will you know a year down the road?
Thursday, March 4, 2010
![Page 5: Why Git](https://reader034.fdocuments.in/reader034/viewer/2022050807/540690d28d7f7288088b460d/html5/thumbnails/5.jpg)
File Based Change Tracking
Thursday, March 4, 2010
![Page 6: Why Git](https://reader034.fdocuments.in/reader034/viewer/2022050807/540690d28d7f7288088b460d/html5/thumbnails/6.jpg)
Changeset Tracking
✴Git treats all your changes as a single ChangeSet.✴It uses a SHA-1 hash of the changes to identify them✴Eg: commit 7ef55e41f1cf529e47723d869233492077c94896
Thursday, March 4, 2010
![Page 7: Why Git](https://reader034.fdocuments.in/reader034/viewer/2022050807/540690d28d7f7288088b460d/html5/thumbnails/7.jpg)
Stupid Content Tracking
Simple object relationships.
Tree (folder) -> Blob (file data)
Thursday, March 4, 2010
![Page 8: Why Git](https://reader034.fdocuments.in/reader034/viewer/2022050807/540690d28d7f7288088b460d/html5/thumbnails/8.jpg)
Commits -> Trees
Thursday, March 4, 2010
![Page 9: Why Git](https://reader034.fdocuments.in/reader034/viewer/2022050807/540690d28d7f7288088b460d/html5/thumbnails/9.jpg)
Refs (Branches)
Refs -> Commits -> Trees -> Blobs
Thursday, March 4, 2010
![Page 10: Why Git](https://reader034.fdocuments.in/reader034/viewer/2022050807/540690d28d7f7288088b460d/html5/thumbnails/10.jpg)
Staging
The Index (Staging Area) allows you to organize
Does the comment make sense for the commit?
Thursday, March 4, 2010
![Page 11: Why Git](https://reader034.fdocuments.in/reader034/viewer/2022050807/540690d28d7f7288088b460d/html5/thumbnails/11.jpg)
Centralized Workflow
Central Repository is treated as a hub for changes. It would drive automated builds.
Thursday, March 4, 2010
![Page 12: Why Git](https://reader034.fdocuments.in/reader034/viewer/2022050807/540690d28d7f7288088b460d/html5/thumbnails/12.jpg)
Distributed Workflow
You can pull from any compatible* source
Thursday, March 4, 2010
![Page 13: Why Git](https://reader034.fdocuments.in/reader034/viewer/2022050807/540690d28d7f7288088b460d/html5/thumbnails/13.jpg)
Branch & Merge tracking
Branch with changes
Merged Tree
Thursday, March 4, 2010
![Page 14: Why Git](https://reader034.fdocuments.in/reader034/viewer/2022050807/540690d28d7f7288088b460d/html5/thumbnails/14.jpg)
Rebase?
Take my commits and replay them after the HEAD of another branch.
Thursday, March 4, 2010
![Page 15: Why Git](https://reader034.fdocuments.in/reader034/viewer/2022050807/540690d28d7f7288088b460d/html5/thumbnails/15.jpg)
Windows Tools
TortoiseGit
Git Extensions
msysgit
Git Cheetah
git-gui
gitk
Thursday, March 4, 2010
![Page 16: Why Git](https://reader034.fdocuments.in/reader034/viewer/2022050807/540690d28d7f7288088b460d/html5/thumbnails/16.jpg)
Live Demo Time.
Thursday, March 4, 2010
![Page 17: Why Git](https://reader034.fdocuments.in/reader034/viewer/2022050807/540690d28d7f7288088b460d/html5/thumbnails/17.jpg)
Notes from the Trenches
Learning curve
Server setup easier on linux
Submodules != svn externals
Watch our for detached HEAD
Be EXTREMELY careful with a force push.
Thursday, March 4, 2010
![Page 18: Why Git](https://reader034.fdocuments.in/reader034/viewer/2022050807/540690d28d7f7288088b460d/html5/thumbnails/18.jpg)
Force things at your own risk.
Thursday, March 4, 2010
![Page 19: Why Git](https://reader034.fdocuments.in/reader034/viewer/2022050807/540690d28d7f7288088b460d/html5/thumbnails/19.jpg)
Why I choose Git.
Merging with history
Quick branch switching
Stashing and Staging
Best SCM I’ve used so far.
Thursday, March 4, 2010
![Page 20: Why Git](https://reader034.fdocuments.in/reader034/viewer/2022050807/540690d28d7f7288088b460d/html5/thumbnails/20.jpg)
QuestionsReferences
http://git-scm.com
http://github.com
http://code.google.com/p/tortoisegit/
http://code.google.com/p/gitextensions/
http://marklodato.github.com/visual-git-guide/
http://progit.org/book/
http://www.timdavis.com.au/git/setting-up-a-msysgit-server-with-copssh-on-windows/
Thursday, March 4, 2010