Download presentation
Presentation is loading. Please wait.
Published bySamuel Woods Modified over 8 years ago
1
Git Girish (girish@forwardbias.in)
2
Git VCS that I have used ClearCase, cvs, svn Happy p4 user
3
From git.or.cz Git is a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Every Git clone is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server. Branching and merging are fast and easy to do.
4
You say... Whoa! Eh, what? So?
5
One Frequently creating backup files Someone interrupts my work I changed my mind to do something else I want to try another approach I want to make an unrelated “change”
6
Two The “Big” commit problem I cannot commit until it's done Tracing a problem Branching appears heavy When revisiting my own code
7
Three Share code with someone I can mail the patch, but this is a hassle UI review – It's only a mockup, not commit material. Code review of big changes - It's easier to explain how I implemented step by step.
8
Four Speed Speed fucks with your mind. The speed of your tool controls how you think. Distraction Bisecting and branching are unthinkable for me
9
Five Merge hell Merges often result in conflicts Every merge loses history What are the commits that are being merged? If you periodically merge two branches, you will keep getting conflicts
10
Six Many minor annoyances In p4, you have to open before edit svn leaves.svn everywhere Cannot work offline
11
Git So what's this git thingie anyway? Git history
12
Git Git revisits some of the fundamental assumptions of version control Why is everything on a a server? Space? Power? Incredibly, 14 years of development history can be crunched into under 2 GB. Solution: Keep everything local
13
Git Don't track files, track content Blobs, trees, commits, branches/tags
14
Git Consequences of git's repo structure: It's local. It's your repo. Branching is practically a no-op Create a branch whenever you start working on any task Modify your local commits at will (amend, rebase, squash, split) Cherry pick between branches It's blazing fast
15
Git Sharing changes Why make it centralized? Anyone should be able to pick branches changes from anyone. Solution: Remotes. Add as many as you like (social coding) Svn can be a remote (git-svn)
16
Git Merge problems Arise because the history of most vcs do not record a merge Solution: Store the commits that created the merge. Tools like annotate can work on originator as opposed to commiter
17
Git Let's go over all my problem again
18
One Frequently creating backup files Someone interrupts my work (stash) I changed my mind to do something else (branch) I want to try another approach (branch) I want to make an unrelated “change” (stash, add -i)
19
Two The “Big” commit problem Because I cannot commit until it's done (commit locally early, often. No one will see your embarassing commits) Tracing a problem (smaller commits are easy to debug) Branching appears heavy (almost a no-op) When revisiting my own code
20
Three Share code with someone For review (UI, code). I can mail the patch, but the receiver has to deal with merge problems (other person can pull my changes or I can push) For code review, it's easier to explain how I implemented step by step (small commits, easier review)
21
Four Speed The speed of your tool controls how you think. Distraction Every tried bisecting? Branching? It's fast.
22
Five Merge hell Merges often result in conflicts Every merge loses history What are the commits that are being merged? If you periodically merge two branches, you will keep getting conflicts Merge commits in git have multiple parents using which history can be tracked and results in better merge.
23
Git But wait there's more Staging Undo (reflog) Signed tags (for security) Git has a tool for every occasion
24
Summary Freedom Supports different workflows One is not restricted by the tool It's fast, so we think differently Quality Don't merge until it's ready Commit early, commit often. Easy to track problems. Use it, to appreciate it better.
25
Email girish@forwardbias.in
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.