Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Dead-Simple Version Control for your Team
Search
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
390
Everyone is a Distance Learner
matthewreidsma
1
390
The UX of Scholarship
matthewreidsma
0
260
Good for Whom? Harvard University Libraries
matthewreidsma
0
330
More than Usable: Library Services for Humans
matthewreidsma
2
60k
Data to Action: A UX Libs Workshop
matthewreidsma
0
70
Customizing Vendor Tools for Better Customer Service
matthewreidsma
1
140
TLN: Responsive Web Design for Libraries
matthewreidsma
1
210
cssMaker
matthewreidsma
1
150
Other Decks in How-to & DIY
See All in How-to & DIY
お家で育てる制御実験環境
zilmina
0
870
データエンジニアのためのテクニカルサポートとLLM
yutomatsunoo
0
1k
Chaos V-Ray Render Pool Manual [EN]
renderpool
0
380
工作教室 ロボットハンドを作ろう
keicafeblack
0
120
drumstick_jacket.pdf
lyh125
1
520
GreenPAK 初心者向けハンズオン資料
aoisaya
2
120
元SREのCREが伝えたい、Mackerelをもっと活用するための実践Tips集 / Mackerel Drink Up #11 do-su-0805
dosu0805
0
230
【1周年】Blueskyちゃん総集編を通じて青空を遊びつくそう
kawaiirailroads
0
270
チームビルディングを受けてみた
harukahosokawa
2
110
3ヶ月でできる! 探査機自作ゼミ教材自作入門
sksat
6
170
240420MapillaryMeetup2024Tokyo
tosseto
0
170
#スタックチャン「魔改造の夜」に行く
syumme01
1
160
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
Site-Speed That Sticks
csswizardry
0
38
Measuring & Analyzing Core Web Vitals
bluesmoon
4
140
Automating Front-end Workflow
addyosmani
1366
200k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Building Your Own Lightsaber
phodgson
103
6.1k
YesSQL, Process and Tooling at Scale
rocio
169
14k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
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
[email protected]
: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
[email protected]
: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
[email protected]
$ssh
[email protected]
$git mkdir MyAwesomeApp
$ssh
[email protected]
$git cd MyAwesomeApp $git mkdir MyAwesomeApp
$ssh
[email protected]
$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
[email protected]
$ssh
[email protected]
$git cd MyAwesomeApp
$ssh
[email protected]
$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
[email protected]
@mreidsma http://github.com/mreidsma http://github.com/gvsulib