Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Dead-Simple Version Control for your Team
Matthew Reidsma
July 25, 2012
How-to & DIY
3
3.5k
Dead-Simple Version Control for your Team
How we use Git and Github to build stuff at Grand Valley State University Libraries
Matthew Reidsma
July 25, 2012
Tweet
Share
More Decks by Matthew Reidsma
See All by Matthew Reidsma
More Than Usable
matthewreidsma
0
180
Everyone is a Distance Learner
matthewreidsma
1
360
The UX of Scholarship
matthewreidsma
0
180
Good for Whom? Harvard University Libraries
matthewreidsma
0
320
More than Usable: Library Services for Humans
matthewreidsma
2
59k
Data to Action: A UX Libs Workshop
matthewreidsma
0
53
Customizing Vendor Tools for Better Customer Service
matthewreidsma
1
120
TLN: Responsive Web Design for Libraries
matthewreidsma
1
170
cssMaker
matthewreidsma
1
93
Other Decks in How-to & DIY
See All in How-to & DIY
アンダーハンドキャスティングの基礎
tiemco
0
5.9k
10 shopping tips on how to save money on groceries
listonic
0
1.2k
IoT Devices: Raspberry Pi
stwn
0
190
自家製Kubernetesクラスタを作ってみた 2022
yutoacts
0
150
Karim Ukulele Therapy - mes scribes
inthealps
3
270
SORACOMで子育てHack
ozk009
0
260
06_Scratchオフラインエディターのダウンロード方法.pdf
keita_yoshikawa
0
290
TOMARIGIとfoxfoxZEROの合併計画
bigtree
0
710
はじめてのBabylon.js
a2k3ine
0
180
teachable machine+scratch焼き芋屋と消防車の音を感知する仕組み作り
keicafeblack
0
240
市民の先生_4写真素材と画像作成.pdf
keita_yoshikawa
0
120
プロジェクト河豚🐡でWebの未来を感じてみよう #jsfes #projectfugu
n0bisuke2
1
840
Featured
See All Featured
Thoughts on Productivity
jonyablonski
44
2.4k
Building Better People: How to give real-time feedback that sticks.
wjessup
344
17k
Principles of Awesome APIs and How to Build Them.
keavy
113
15k
The Pragmatic Product Professional
lauravandoore
19
3.1k
YesSQL, Process and Tooling at Scale
rocio
157
12k
Mobile First: as difficult as doing things right
swwweet
213
7.6k
BBQ
matthewcrist
74
7.9k
What's new in Ruby 2.0
geeforr
335
30k
Visualization
eitanlees
125
12k
Design by the Numbers
sachag
271
17k
From Idea to $5000 a Month in 5 Months
shpigford
373
44k
Git: the NoSQL Database
bkeepers
PRO
415
59k
Transcript
DEAD-SIMPLE VERSION CONTROL FOR YOUR TEAM GIT WITH MATTHEW REIDSMA
GRAND VALLEY STATE UNIVERSITY
WHO DOESN’T USE VERSION CONTROL?
VERSION CONTROL WHO?
OH BOY.
WHY YOU NEED VERSION CONTROL
GIT
GIT
WHY GIT IS AWESOME
HOW GIT WORKS
WORKING DIRECTORY
WORKING DIRECTORY INDEX (STAGING AREA) add
WORKING DIRECTORY INDEX (STAGING AREA) LOCAL REPOSITORY add commit
WORKING DIRECTORY INDEX (STAGING AREA) LOCAL REPOSITORY REMOTE REPOSITORY add
commit push
My-Computer: mreidsma$ _
My-Computer: mreidsma$ _ SCARY
None
$cd MyAwesomeApp
$cd MyAwesomeApp $touch index.html
$cd MyAwesomeApp $git init Initialized empty Git repository in /MyAwesomeApp/.git/
$touch index.html
$cd MyAwesomeApp $git init Initialized empty Git repository in /MyAwesomeApp/.git/
$git add . $touch index.html
$cd MyAwesomeApp $git init Initialized empty Git repository in /MyAwesomeApp/.git/
$git add . $git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # #! new file: index.html # $touch index.html
None
$git commit -m “First commit” [master (root-commit) 7ce2952] First commit
1 file changed, 2 insertions(+) create mode 100644 index.html
$git commit -m “First commit” $git remote add origin git@github.com:gvsulib/
awesomeapp.git [master (root-commit) 7ce2952] First commit 1 file changed, 2 insertions(+) create mode 100644 index.html
$git commit -m “First commit” $git remote add origin git@github.com:gvsulib/
awesomeapp.git [master (root-commit) 7ce2952] First commit 1 file changed, 2 insertions(+) create mode 100644 index.html $git push origin master
None
BRANCHING
[master]
[master]
[master]
[master]
[master]
[master] [branch]
[master] [branch]
[master] [branch] merge
BRANCHES ARE CHEAP
None
$cd MyAwesomeApp
$cd MyAwesomeApp $git branch newFeature
$cd MyAwesomeApp $git checkout newFeature $git branch newFeature Switched to
branch ‘newFeature’
$cd MyAwesomeApp $git checkout newFeature $git branch newFeature <!-- AWESOME
FEATURE ADDING ACTION HERE --> Switched to branch ‘newFeature’
$cd MyAwesomeApp $git checkout newFeature $git add . $git branch
newFeature <!-- AWESOME FEATURE ADDING ACTION HERE --> Switched to branch ‘newFeature’
$cd MyAwesomeApp $git checkout newFeature $git add . $git status
# On branch newFeature # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # #! modified: index.html # $git branch newFeature <!-- AWESOME FEATURE ADDING ACTION HERE --> Switched to branch ‘newFeature’
None
$git commit -m “Best feature ever” [newFeature 18q7d58] Best feature
ever 1 file changed, 1 insertions(+)
$git commit -m “Best feature ever” $git checkout master [newFeature
18q7d58] Best feature ever 1 file changed, 1 insertions(+) Switched to branch ‘master’
$git commit -m “Best feature ever” $git checkout master [newFeature
18q7d58] Best feature ever 1 file changed, 1 insertions(+) $git merge newFeature Switched to branch ‘master’ Updating 7ce2952..18q7d58 index.html | 1 + 1 file changed, 1 insertion(+)
BUT YOU CHANGED THE FILE
WORKFLOWS
LOCAL
LOCAL REMOTE
LOCAL LOCAL
LOCAL REMOTE LOCAL
LOCAL LOCAL REMOTE WEB SERVER
LOCAL LOCAL REMOTE WEB SERVER
HOW WE DO IT @ GVSU
None
None
GITHUB
GITHUB WEB SERVER
MASTER IS ALWAYS DEPLOYABLE
None
$ssh username@gvsu.edu
$ssh username@gvsu.edu $git mkdir MyAwesomeApp
$ssh username@gvsu.edu $git cd MyAwesomeApp $git mkdir MyAwesomeApp
$ssh username@gvsu.edu $git cd MyAwesomeApp remote: Counting objects: 1, done.
remote: Compressing objects: 100% (1/1), done. remote: Total 1 (delta 21), reused 1 (delta 14) Unpacking objects: 100% (1/1), done. $git mkdir MyAwesomeApp $git clone https://github.com/gvsulib/ awesomeapp.git Cloning into awesomeapp...
None
$ssh username@gvsu.edu
$ssh username@gvsu.edu $git cd MyAwesomeApp
$ssh username@gvsu.edu $git cd MyAwesomeApp $git pull origin master
BUT
None
None
https://gist.github.com/3138516
OTHER FANCY FEATURES
.gitignore
diff
log
filter-branch
stash
reset
RESOURCES John Fink: A Gentle Introduction to Modern Version Control
http://acrl.ala.org/techconnect/?p=1191 Flashbake - automated git for writers http:/bitbucketlabs.net/flashbake Download git http://git-scm.com Git Reference http://gitref.org Git and Github Bootcamp http://help.github.com/articles/set-up-git
None
THANK YOU reidsmam@gvsu.edu @mreidsma http://github.com/mreidsma http://github.com/gvsulib