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
410
Everyone is a Distance Learner
matthewreidsma
1
400
The UX of Scholarship
matthewreidsma
0
270
Good for Whom? Harvard University Libraries
matthewreidsma
0
340
More than Usable: Library Services for Humans
matthewreidsma
2
60k
Data to Action: A UX Libs Workshop
matthewreidsma
0
72
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
DroidKaigi 2024 - 海外就職というキャリアの選択肢
iyotetsuya
1
640
とある航空会社の飛行機の乗り方をお教えします。/20240913-lt
kwada
3
260
LT(Lightning Talk)のドキドキ感を共有する IoT ぼっとを作った話
scbc1167
1
170
雑にコミュニティを続けてもいいと思っている/Feel free to continue the community
camel_404
0
120
カフェでノートPCが盗難されたかどうかを検知するIoT #linedc #iotlt #obniz #protoout
n0bisuke2
1
340
新婚19年目から学ぶ夫婦円満の正しい歩き方 / Life is beautiful
soudai
12
4.4k
JAWS-UGについて JAWS-UG TOHOKU [青森] 弘前開催
awsjcpm
0
120
GPTsとラズパイ5で監視カメラを作ってみた #iotlt #chatgpt #raspberrypi
n0bisuke2
0
570
カンファレンスでリフレッシュ!無理なく楽しむカンファレンス参加術 / How to enjoy conferences without stress
kattsuuya
1
7.5k
M5Stackを使ってSズキの魔改造モンスターマシンを作ってみた
syumme01
0
100
バーチャルバナナとリアルバナナ #iotlt #TouchDesigner
n0bisuke2
0
130
JAWS-UGから学んだコミュニティの成功要因 (Success Factors)
awsjcpm
4
400
Featured
See All Featured
Fireside Chat
paigeccino
34
3.2k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.7k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.1k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
The Cult of Friendly URLs
andyhume
78
6.2k
A Tale of Four Properties
chriscoyier
158
23k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.3k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.2k
The Pragmatic Product Professional
lauravandoore
32
6.4k
It's Worth the Effort
3n
184
28k
Java REST API Framework Comparison - PWX 2021
mraible
29
8.4k
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