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 workshop
Search
Daichi Hirata
October 03, 2012
Programming
9.6k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Git workshop
Nubee Tokyo Oct. 3, 2012
Daichi Hirata
October 03, 2012
More Decks by Daichi Hirata
See All by Daichi Hirata
GCPのネットワークでハマった話
daic_h
7
4.1k
ElasticBeatsを導入してみた話/Go Conference 2016 Spring
daic_h
3
6.1k
Ruby
daic_h
0
130
Other Decks in Programming
See All in Programming
メールのエイリアス機能を履き違えない
isshinfunada
0
170
PHPだって関数型したい 〜できること、できないこと〜 / fp-in-php
jsoizo
1
260
AIエージェントで 変わるAndroid開発環境
takahirom
2
760
【やさしく解説 設計編・中級 #1】一つの車に、運転手は一人 ~ある倉庫システムの事例から~
panda728
PRO
0
200
使いながら育てる Claude Code — 開発フローの1コマンド化 × 繰り返し指摘の自動仕組み化
shiki_kakaku
0
1.5k
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
450
その節約、円になってますか?
isamumumu
0
630
php-fpmのプロセスが枯渇した日-調査・対処・そして本当にやるべきだったこと-
shibuchaaaan
0
180
React本体のコードリーディング
high_g_engineer
1
120
【やさしく解説 設計編・中級 #6】良いアーキテクチャとは ~ 一本の登り道の、行き先 ~
panda728
PRO
0
200
【SRE NEXT 2026 Lunch Session】一人目専任SREの立ち上げを加速する ― AIと進めたオンボーディングで2分を0.04秒にした話
pkshadeck
PRO
0
3.3k
AI時代のPHPer生存戦略 ~「言語、もうなんでもよくない?」に本気で向き合う~
vivion
0
210
Featured
See All Featured
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
410
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
WENDY [Excerpt]
tessaabrams
11
39k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
190
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
430
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
360
Building the Perfect Custom Keyboard
takai
2
820
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4k
Speed Design
sergeychernyshev
33
2k
sira's awesome portfolio website redesign presentation
elsirapls
0
310
Transcript
WorkShop server-side engineer Daichi Hirata
Purpose (JUʹରͯ͠ͷڞ௨ೝࣝ $PNNPOVOEFSTUBOEJOHGPS(JU ϊϋͷڞ༗ 4IBSJOHPGLOPXMFEHF
Agenda (JUͷجૅࣝ #BTJDLOPXMFEHF 5JQT
Basic knowledge
SVN Remote Repository Working Tree Commit / Checkout
Repository Working Tree .git internal Index Remote Repository stash Pull
/ Push Git
Repository Working Tree Index Component
Repository Working Tree Index git checkout Component ͍ͭͰϦϙδτϦ͔ΒҎલͷঢ়ଶͷ ϫʔΩϯάπϦʔΛνΣοΫΞτՄೳ :PVDBODIFDLPVUUIFXPSLJOHUSFFGSPNUIFSFQPTJUPSZ
BUBOZUJNFPGUIFQSFWJPVTTUBUF
Repository Working Tree Index Component git checkout git add ϫʔΩϯάπϦʔͷมߋ͕Πϯ
σοΫεొ͞ΕΔ $IBOHFUIFXPSLJOHUSFFUPUIFJOEFYJT SFHJTUFSFE
Repository Working Tree Index Component git checkout git add ΠϯσοΫεͷมߋ͕ϦϙδτϦ
ίϛοτ͞ΕΔ *OEFYDIBOHFTBSFDPNNJUUFEUPUIF SFQPTJUPSZ git commit
Repository Working Tree Index Component stash Ұ࣌తͳมߋίϛοτͰ͖ͳ͍ มߋΛୀආͤ͞Δ &WBDVBUFBOEDPNNJUDIBOHFTUIBUDBO OPUCFBUFNQPSBSZDIBOHF
git stash
Commit ϑΝΠϧπϦʔ 'JMFUSFF Ճใ "EEJUJPOBMJOGPSNBUJPO લͷίϛοτ -BTUDPNNJU
Commit ϑΝΠϧπϦʔ 'JMFUSFF Ճใ "EEJUJPOBMJOGPSNBUJPO લͷίϛοτ -BTUDPNNJU
Commit ϑΝΠϧπϦʔ 'JMFUSFF Ճใ "EEJUJPOBMJOGPSNBUJPO લͷίϛοτ -BTUDPNNJU ͲΕ͔̍ͭͰҟͳΕಉ͡ϑΝΠ ϧɺಉ͡༰ͰҟͳΔίϛοτ $PNNJUUIFTBNFpMFXJUIEJGGFSFOU
FWFOXJUIUIFTBNFDPOUFOUCVU EJGGFSFOUJGBOZPOF
Commit ϑΝΠϧπϦʔ 'JMFUSFF Ճใ "EEJUJPOBMJOGPSNBUJPO લͷίϛοτ -BTUDPNNJU
ҙͷίϛοτ͔Β࠷ॳͷίϛοτ JOJUJBMDPNNJU ͔Βͦͷίϛοτʹ ࢸΔશͯͷཤྺ͕औಘͰ͖Δ Commit )JTUPSZBMMUIFXBZUPDPNNJUGSPNUIF JOJUJBMDPNNJU DBOCFPCUBJOFEGSPNUIF pSTUDPNNJUDPNNJUBOZ
͋Δίϛοτ ͦͷϒϥϯνͷ࠷৽ͷί ϛοτ ʹࢸΔཤྺͱকདྷ Branch )JTUPSZBOEGVUVSFMFBEJOHUPUIF NPTU SFDFOUDPNNJUPOUIBUCSBODI DPNNJU UIFSF
Branch
C0 C1 C2 master hotfix Merge
C0 C1 C2 C3 master hotfix Merge
C0 C1 C2 C3 master hotfix Merge
C0 C1 C2 C3 master hotfix Fast foward Merge
C0 C1 C2 C3 master #11 C4 Merge
C0 C1 C2 C3 master #11 C4 Merge
C0 C1 C2 C3 master #11 C4 Merge
C0 C1 C2 C3 master #11 C4 Merge
C0 C1 C2 C3 master #11 C4 C5 Merge
C0 C1 C2 C3 master #11 C4 Rebase
C0 C1 C2 C3 master #11 C4 Rebase
C0 C1 C2 C3’ master #11 C4’ master cherry-pick Rebase
C0 C1 C4 C2 C3 C5 C8 C6 C7 #12
master #13 Rebase
C0 C1 C4 C2 C3 C5 C8 C6 C7 #12
master #13 Rebase
C0 C1 C4 C2 C3 C5 C8 C6 C7 #12
master #13 $ git rebase --onto master #12 #13 Rebase
Tips
$git stash $git bisect $git commit --amend $git rebase -i
HEAD~x $git cherry-pick $git reflog tips1: Useful Commands
$git stash drop stash@{x} $git stash apply [stash@{x}] $git stash
pop [stash@{x}] $git stash list $git stash [save message] $ git stash $git stash clear
$git stash drop stash@{x} $git stash apply [stash@{x}] $git stash
pop [stash@{x}] $git stash list $git stash [save message] $ git stash
$git stash drop stash@{x} $git stash apply [stash@{x}] $git stash
pop [stash@{x}] $git stash list $git stash [save message] $ git stash $git stash clear
$git reflog $git cherry-pick $git rebase -i HEAD~x $git bisect
$git stash tips1: Useful Commands $git commit --amend
$git bisect start $git bisect bad $git bisect good rev
$git bisect next $git bisect bad/good $git bisect reset $git bisect run <test_file> $git bisect
$git reflog $git cherry-pick $git rebase -i HEAD~x $git commit
--amend $git stash tips1: Useful Commands $git bisect
$git reflog $git cherry-pick $git rebase -i HEAD~x $git commit
--amend $git stash tips1: Useful Commands $git bisect
$git reflog $git cherry-pick $git rebase -i HEAD~x $git commit
--amend $git stash tips1: Useful Commands $git bisect
$git reflog $git cherry-pick $git rebase -i HEAD~x $git commit
--amend $git stash tips1: Useful Commands $git bisect
tips2: Setting [color] diff = auto status = auto branch
= auto ui = auto [alias] co = checkout st = status -sb wd = diff --word-diff tlog = log --graph --pretty=oneline --decorate --date=short --abbrev-commit --branches hist = log --pretty=format:\"%C(yellow)%h %C(White)%ad | %C(White)%s%d %C(Red)[%an]\" --graph --date=short [merge] tool = vimdiff [core] excludesfile = ~/.gitignore
tips2: Setting - gst
tips2: Setting - ignore-changes
tips2: Setting - prompt