3. My ideal version control system
● Fast
● Flexible
● Offline
● Smart
4. CVS/SVN
● CVS:
– I never used CVS. I'm too young.
● SVN:
– I can't commit locally
– I can't branch as I wish
– The Merging just doesn't work.
– All the operation are on-line. (No connection no
cookies)
5. Bazaar
● Good things:
– No network needed
– Really cool way to export your code in a tarball
● Problems:
– SVN interface didn't work properly
– Branching and merging is ok but not as fast as git.
6. What is Git?
Git is an opensource distributed verson control
system which makes you happy.
7. Hey, but I work alone!
● Do you develop in linear fashon?
● Do you usually make a massive commit and
then you can't track what you had really
changed?
8. Or... I have just a bunch of files
● Don't you change them quite often?
● Don't you need to keep track of what is going
on?
● ...
25. Local Rules:
With No Network you can:
● Performing a diff
● Viewing file history
● Committing changes
● Merging branches
● Obtaining any other revision of a file
● Switching branches
39. You can move around a lot of
branches and try different things
$ git checkout -b feature_x
#hack #hack
$ git commit -am ”Adding new feature_x”
$ git checkout master
$ git merge feature_x
It's fast
You retain control
48. Scenario
File1 -- Correct a typo
File2 -- introduced a new method
File3 -- Introduced new method
49. Control gives you flexibility
$ git add file1
$ git commit -m ”corrected a typo.”
$ git add file2 file3
$ git commit -m ”Introduced the
newfeature to land on the moon.”
50. Mantra: Small commit are good
Do a lot of commit and divide your change
logically in small part.
It will help you a lot when you will break
everything (and you will...)
64. Useful resources:
Git http://git-scm.com/
Github http://github.com
Nice guide http://rogerdudler.github.com/git-guide/
my profile https://github.com/mattions
Credits: Some of the slides were taken from Scott Chacon
https://github.com/schacon