1 Git Fundamentals m0 Slides
1 Git Fundamentals m0 Slides
James Kovacs
jameskovacs.com
Overview
First Generation
Single-file
No networking
e.g. SCCS, RCS
Second Generation
Multi-file
Centralized
e.g. CVS, VSS, SVN, TFS, Perforce
Third Generation
Changesets
Distributed
e.g. Git, Hg, Bazaar, BitKeeper
Further reading
http://www.ericsink.com/vcbe/html/history_of_version_control.html
Advantages of DVCS
Different topologies
Centralized
Developers push changes to one central repository
Hierarchical
Developers push changes to subsystem-based repositories
Sub-system repositories are periodically merged into a main repository
Distributed
Developers push changes to their own repository
Project maintainers pull changes into the official repository
Backups are easy
Each clone is a full backup
Advantages of DVCS
Reliable branching/merging
Feature branches
Always work under version control
Applying fixes to different branches
Full local history
Compute repository statistics
Analyze regressions
New ideas
Deployment
git push heroku prod_branch
About Git
Windows
msysGit (http://msysgit.github.com)
Mac OSX
brew install git
DMG (http://git-scm.com/download/mac)
Linux
apt-get install git-core (Debian/Ubuntu distros)
yum install git-core (Fedora distros)
For other distros, check your package manager
Configuring Git
System-level configuration
git config --system
Stored in /etc/gitconfig or c:\Program Files (x86)\Git\etc\gitconfig
User-level configuration
git config --global
Stored in ~/.gitconfig or c:\Users\<NAME>\.gitconfig
Repository-level configuration
git config
Stored in .git/config in each repo
Summary