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
Git Hands-On
Search
Kenichi Takahashi
October 01, 2014
Programming
10
6.5k
Git Hands-On
新卒エンジニア研修で使った資料です。
Kenichi Takahashi
October 01, 2014
Tweet
Share
More Decks by Kenichi Takahashi
See All by Kenichi Takahashi
Lv1,2の開発生産性を経営と繋ぐ
kenchan
4
1.6k
「トップ10プランナー」からはじめる目標設定
kenchan
5
3.3k
負債と言わないことが負債と向き合うこと
kenchan
5
3.5k
可用性No.1へ!「カラーミーショップ」のリ・アーキテクティング
kenchan
0
72
カラーミーショップは私たちが作っています
kenchan
0
1.4k
カラーミーショップ 2022 / COLORME SHOP 2022
kenchan
0
600
Amazon RDS移行のための 性能検証でわかった2つのこと
kenchan
3
3.7k
ポストコロナの商売を支えるカラーミーショップのアーキテクチャのこれから / The new architecture of COLORME SHOP in the Post-COVID-19 world
kenchan
2
2k
ペパボのエンジニアリングマネジメント一問一答 / engineering-management-q-and-a-in-gmo-pepabo
kenchan
7
2.5k
Other Decks in Programming
See All in Programming
Macとオーディオ再生 2024/11/02
yusukeito
0
370
Amazon Qを使ってIaCを触ろう!
maruto
0
410
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
920
Figma Dev Modeで変わる!Flutterの開発体験
watanave
0
120
Outline View in SwiftUI
1024jp
1
330
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
110
Ethereum_.pdf
nekomatu
0
460
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
1.4k
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
870
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.1k
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
920
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
94
13k
Done Done
chrislema
181
16k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
120
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
Building Adaptive Systems
keathley
38
2.3k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
How GitHub (no longer) Works
holman
310
140k
Transcript
GMO Pepabo, Inc. Kenichi TAKAHASHI 2014/10/01 ৽ଔΤϯδχΞݚम Git Hands-On
,FOJDIJ5",")"4)* IUUQTIVDSFBNOFU UXJUUFS!LFODIBO HJUIVCLFODIBO +PJOPO"QS ! (FOUPP 'VOUPP
-JOVY 5JMJOH8JOEPX.BOBHFS ,JOFTJT$POUPVSFE,FZCPBSE !
$POUFOUT αϒίϚϯυͱNBO ίϛοτɺϒϥϯνɺλά NFSHFͱSFCBTF
αϒίϚϯυͱNBO
mkdir git-hands-on cd git-hands-on git init
touch README.md git status
git add README.md
git status
git commit -m ‘initial commit’
man git-commit
&YFSDJTFT HJUMPHͷNBOΛݟͯɺͬͨ͜ͱ ͷͳ͍ΦϓγϣϯΛࢼͯ͠ΈΑ͏
echo ‘# Git Tutorial’ > README.md
git diff
git add -u
man git-add
git diff --staged
git commit -m ‘Add title’
git log
3FDBQ αϒίϚϯυͱNBOͷ͍ํ εςʔδͱ͍͏֓೦
"EWBODFE&YFSDJTFT HJUEJ⒎TUBHFEΛ࣮ߦ͢Δαϒί ϚϯυɺHJUETΛ࡞ͬͯΈΑ͏
mkdir bin ! echo "\!#/bin/sh\n\ngit diff -- staged" > bin/git-ds
! chmod +x bin/git-ds ! PATH=./bin:$PATH git ds
ίϛοτ ϒϥϯν λά
git log git log --oneline git log --oneline --decorate
man git-log
git tag v0.0.1
git log --oneline --decorate
git branch update-readme
git log --oneline --decorate
&YFSDJTFT DPNNJUɺCSBODIɺUBHԿ͕ҧ͏ ͷ͔͋ͬͯ͠ΈΑ͏
ޡղΛڪΕͣʹݴ͏ͱ commitͷϋογϡͷผ໊͕ ϒϥϯνɺλά
git log --oneline --decorate
HEADࠓ͍Δίϛο τΛࠩ͢ϙΠϯλ
git checkout (Ұͭલͷίϛοτ) git log --online --decorate
git checkout master git log --oneline --decorate
&YFSDJTFT NBTUFSͷҰͭલͷίϛοτΛ DIFDLPVU͠ɺ3&"%.&Λमਖ਼͠ ͯίϛοτͯ͠ΈΑ͏ ͜ͷͱ͖ɺίϛοτͷάϥϑ͕Ͳ͏ ͳ͍ͬͯΔ͔ߟ͑ͯΈΑ͏
git checkout HEAD~ echo 'hello antipop' >> README.md ! git
add -u git commit -m 'Lost commit' ! git log --oneline --decorate ! git checkout master ! git log --oneline --decorate
3FDBQ ϩάίϛοτͷ࿈ͳΓ UBH CSBODIDPNNJUͷผ໊ )&"%ࠓ͍Δͱ͜ΖΛࠩ͢ϙΠϯ λ
"EWBODFE&YFSDJTF ḷΕͳ͘ͳͬͨίϛοτΛ෮چ͢Δ ํ๏ΛΒͯΈΑ͏
NFSHFͱSFCBTF
git checkout update-readme
echo 'hello hsbt' >> README.md ! git diff ! git
add -u ! git commit -m 'Hello hsbt'
echo 'Konichiwa Rails' >> README.md ! git diff ! git
add -u ! git commit -m 'Konichiwa Rails' ! git log --oneline --decorate
git checkout master
touch History.md ! git add History.md ! git commit -m
'Create History.md’ ! git log --oneline --decorate !
git merge update-readme
&YFSDJTF T NFSHFίϛοτΛΈͯίϛοτͷܨ ΓΛ૾ͯ͠ΈΑ͏
"EWBODFE&YFSDJTFT ͠ɺNBTUFSʹίϛοτ૿͑ͯͳ ͔ͬͨͱ͖ͷϚʔδʹ͍ͭͯௐͯ ΈΑ͏ ώϯτ'BTU'PSXBSE
git checkout -b hello-swift ! echo 'Hello Swift' > Swift.md
! git add Swift.md ! git commit -m 'Add Swift.md'
git checkout master ! echo 'Hello Android' >> README.md !
git add -u ! git commit -m ‘Hello Android'
git checkout hello-swift
git log --oneline --decorate ! (ίϛοτΛϝϞ͓ͯ͜͠͏)
git rebase master
git log --oneline --decorate
&YFSDJTFT SFCBTFʹΑͬͯίϛοτͷܨ͕Γ ͕Ͳ͏มΘͬͨͷ͔૾ͯ͠ΈΑ͏ ϝϞ͓͍ͯͨ͠ίϛοτΛDIFDLPVU ͯ͠ɺHJUMPHΛݟͯΈΑ͏
3FDBQ HJUNFSHFͭͷίϛοτΛઌ ʹ࣋ͭίϛοτΛ࡞Δ HJUSFCBTFίϛοτ͔ΒύονΛ ࡞ͬͯɺͦΕΛҰ͍ͭͣͭͯͯ͘
"EWBODFE&YFSDJTFT NFSHFͱSFCBTFͰͦΕͧΕίϯϑ ϦΫτͷղܾํ๏ʹ͍ͭͯ͋ͬͯ ΈΑ͏
·ͱΊ
$POUFOUT αϒίϚϯυͱNBO ίϛοτɺϒϥϯνɺλά NFSHFͱSFCBTF
αϒίϚϯυͱNBO NBOͷ͍ํ εςʔδͱ͍͏֓೦
ίϛοτɺϒϥϯνɺλά ϩάίϛοτͷ࿈ͳΓ UBH CSBODIDPNNJUͷผ໊ )&"%ࠓ͍Δͱ͜ΖΛࠩ͢ϙΠϯ λ
NFSHFͱSFCBTF HJUNFSHFͭͷίϛοτΛઌ ʹ࣋ͭίϛοτΛ࡞Δ HJUSFCBTFίϛοτ͔ΒύονΛ ࡞ͬͯɺͦΕΛҰ͍ͭͣͭͯͯ͘
ଓ͖ Pro Git http://progit-ja.github.io/
"OZ2VFTUJPOT