Git Workshop
Understanding and using
version control for real work
Hi, I'm Chris
I build web apps and teach people to do the same at the Lansing Code Lab
lansingcodelab.com
What is Git?
A distributed version control system
What is version control?

What is distributed
version control?

Why version control?
- Sharing code between developers
 - Backing up code between multiple machines
 - Looking back in time
 - Tracking and analyzing changes
 
The Terminal

Terminal commands
- 
	
pwd # Where am I?
 - 
	
ls # What's in the current directory?
 - 
	
cd # Change to a different directory
 
Installing Git in the terminal
WINDOWS
- Install Git Bash at git-scm.com/download/win
 
OS X
- Install Homebrew at brew.sh
 - Open the Terminal app
 - 
	
brew install git
 
DEBIAN-BASED LINUX (LIKE UBUNTU)
- Open the Terminal app
 - 
	
sudo apt-get install git
 
Getting started
FROM GITHUB
- 
	
Create a repo on GitHub
 - 
	
git clone https://github.com/USER/REPO.git
 

Getting started
FROM A LOCAL PROJECT
- 
	
cd path/to/my-project
 - 
	
git init
 
Committing changes
- 
	
git add -A .
 - 
	
git commit -m "description of changes"
 - 
	
git push origin master
 
Free static web hosting!
- 
	
git push origin master:gh-pages
 - 
	
Visit USER.github.io/REPO
 
Contributing to
open source
- Fork
 - Clone
 - Push
 - Pull Request
 
Collaboration with Git
- Conflicts
 - Merge vs Rebase
 
More resources
- slides.com/chrisfritz/lcc-git-intro
 - try.github.io
 - onlywei.github.io/explain-git-with-d3
 
Questions?
lcc-git-intro
By Chris Fritz
lcc-git-intro
- 1,810