Diamond Application Development Crafting Solutions with Precision
Git for Beginners
1. Git for Beginners
New England Drupal Camp
November 1, 2014
Rick Umali
@rickumali
http://tech.rickumali.com/
Slides!
2. Me and You
● Me
○ VIC-20
○ Boston
○ Data Janitor
○ Git
● You?
3. Book!
Nov 1, 2014: drupalcftw (44% off) thru
November 2014
One Day Special: Nov 2, 2014:
dotd110214au (50% off)
44%
Off!
http://www.manning.com/umali
11. Repeat 2 and 3
% vi dumpstamp.info dumpstamp.module
% git status
% git add .
% git status
% git commit (or git citool)
% git diff
12. Tagging a Version
% git tag -a v1.0
% git tag -l -n
% git show v1.0
v1.0
annotated
Bookmarks
13. Repeat 2 and 3
% vi dumpstamp.module
% git status
% git add .
% git status
% git diff
% git commit
v1.0
14. Go Back in Time
% git checkout v1.0
% git checkout master
v1.0
Detached HEAD
15. Fork in the Road (Branch)
% git checkout -b time_stamp v1.0
OR
% git checkout v1.0
% git branch time_stamp
% git checkout time_stamp v1.0
We’ve been working
on a branch all along!
16. Add Code to New Branch
% git branch
% vi dumpstamp.module
% git status
% git diff
% git commit -a
v1.0
Separate lines of
code/development