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 / Git for Hardware and Soft...
Search
Yusuke Miyazaki
April 14, 2016
Programming
0
230
計算機科学実験及び演習のための Git / Git for Hardware and Software Laboratory Project
Yusuke Miyazaki
April 14, 2016
Tweet
Share
More Decks by Yusuke Miyazaki
See All by Yusuke Miyazaki
Adopting Kafka for the #1 job site in the world
ymyzk
1
7.6k
Python ウェブアプリケーションのためのプロファイラの実装 // Implementation of a profiler for Python web applications
ymyzk
2
5.3k
CAMPHOR- のスケジュール管理を支える技術 // Schedule Management in CAMPHOR-
ymyzk
1
580
tmux 入門 / Introduction to tmux
ymyzk
0
720
技術カンファレンスのススメ / Tech Conference
ymyzk
0
440
Proper Tail Calls - New Feature in ECMAScript 2015
ymyzk
1
360
Modern JavaScript - Introduction to ECMAScript 2015 & 2016
ymyzk
0
220
コンテナ型仮想化入門 / Introduction to container-based virtualization
ymyzk
0
330
漸進的型付けについて語る会 オープニング / Gradual Typing Opening
ymyzk
0
490
Other Decks in Programming
See All in Programming
Using Livebook to build and deploy internal tools @ ElixirConf 2024
hugobarauna
0
240
rails_girls_is_my_gate_to_join_the_ruby_commuinty
maimux2x
0
190
Swift Concurrencyとレースコンディション
objectiveaudio
1
410
マイグレーションコード自作して File-Based Routing に自動移行!! ~250 ページの歴史的経緯を添えて~
cut0
1
260
Kotlin 2.0 and Beyond
antonarhipov
2
150
What you can do with Ruby on WebAssembly
kateinoigakukun
0
150
実践 Advanced CallKit 〜快適な通話の実現に向けて〜
mot_techtalk
3
120
ECMAScript、Web標準の型はどう管理されているか / How ECMAScript and Web standards types are maintained
petamoriken
3
390
Regular Expressions, REXML, Automata Learning
makenowjust
0
210
Rechartsで楽にゴリゴリにカスタマイズする!
10tera
1
160
Modular Monolith Go Server with GraphQL Federation + gRPC
110y
1
580
意外とフォントが大事だった話 / Font Issues on Internationalization
fumi23
0
100
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
458
32k
How STYLIGHT went responsive
nonsquared
93
5.1k
The Brand Is Dead. Long Live the Brand.
mthomps
53
37k
Product Roadmaps are Hard
iamctodd
PRO
48
10k
Into the Great Unknown - MozCon
thekraken
28
1.4k
Designing for humans not robots
tammielis
248
25k
Designing with Data
zakiwarfel
98
5k
In The Pink: A Labor of Love
frogandcode
139
22k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
326
21k
10 Git Anti Patterns You Should be Aware of
lemiorhan
653
58k
Build your cross-platform service in a week with App Engine
jlugia
228
18k
Optimising Largest Contentful Paint
csswizardry
29
2.8k
Transcript
ܭࢉثՊֶ࣮ݧٴͼԋश :VTVLF.JZB[BLJ !૯߹ݚڀ߸ؗ ܭࢉػՊֶ࣮ݧٴͼԋशͷ ͨΊͷ(JU
͜Μͳ͜ͱ͋Γ·ͤΜ͔ w ʮίʔυΛॻ͍͍ͯͨΒΑ͘Θ͔Βͳ͘ͳͬͨ ͷͰࡢॻ͍ͨͱ͜Ζ·ͰΓ͍ͨʯ w ʮͲ͜Λฤूͨ͠ͷ͔͔Βͳ͘ͳͬͨʯ w ʮ՝Λఏग़ͨ͠λΠϛϯάͷίʔυΛͯ͠ ͓͖͍ͨʯ
(JUΛ͏ͱʜ w ࣍ͷΑ͏ͳ͜ͱ͕Ͱ͖·͢ w ػೳΛͭՃͨ͠ޙͷঢ়ଶΛอଘ w ՝Λఏग़ͨ͠λΠϛϯάͷঢ়ଶΛอଘ w લճͷঢ়ଶ͔Βฤूͨ͠༰ͷࠩΛӾཡ
(JUͱ w ࢄܕόʔδϣϯཧγεςϜ 7$4 w -JOVYΧʔωϧͷόʔδϣϯཧͷͨΊʹ -JOVT5PSWBMETࢯʹΑͬͯ։ൃ w ݱࡏͷϝϯςφᖛ७ࢯ
όʔδϣϯཧγεςϜ w ϑΝΠϧ ιʔείʔυͳͲ ͷมߋཤྺΛཧ ͢ΔγεςϜ w ػೳΛՃ͢Δͨͼʹͦͷঢ়ଶΛอଘͰ͖Δ w όάΛࠐΜͰ͠·ͬͨ߹Ҏલͷঢ়ଶʹ
Δ͜ͱ͕Ͱ͖Δ w ͋ΔఔͷنͷιϑτΣΞͰ΄΅ඞਢ
(JUͷΠϝʔδ ίϛοτ ϑΝΠϧͷมߋ༰ ϝοηʔδΛؚΉ w ίϛοτ͕༗ඇ८ճάϥϑ %"( Λ͢ ϒϥϯνɾϚʔδ ཤྺΛذͯ͠౷߹Ͱ͖Δ
ࠓճઆ໌͠ͳ͍
࡞ۀͷྲྀΕ 8PSLJOH ࡞ۀσΟϨΫτϦ 4UBHJOH )JTUPSZ ίϛοτ OFX QBSTFSSLU UFTUSLU
NPEJpFE TZOUBYSLU 8PSLJOH%JSFDUPSZʹϑΝΠϧΛՃɾฤू
࡞ۀͷྲྀΕ 8PSLJOH ࡞ۀσΟϨΫτϦ 4UBHJOH )JTUPSZ ίϛοτ ίϛοτ͍ͨ͠ϑΝΠϧΛTUBHJOHʹ HJUBEEpMFpMF OFX
QBSTFSSLU UFTUSLU NPEJpFE TZOUBYSLU OFX QBSTFSSLU NPEJpFE TZOUBYSLU
࡞ۀͷྲྀΕ 8PSLJOH ࡞ۀσΟϨΫτϦ 4UBHJOH )JTUPSZ ίϛοτ 4UBHJOHͷ༰Λίϛοτ ཤྺʹొ
HJUDPNNJUNNFTTBHF OFX QBSTFSSLU UFTUSLU NPEJpFE TZOUBYSLU OFX QBSTFSSLU NPEJpFE TZOUBYSLU NFTTBHF IBTI OFX QBSTFSSLU NPEJpFE TZOUBYSLU
ϦϙδτϦͷ࡞ w όʔδϣϯཧΛ࢝ΊΔͨΊʹ ཤྺΛ֨ೲ͢Δ (JUϦϙδτϦΛ࡞͢Δ w ͡ΊʹҰ͚ͩߦ͑ w ϓϩδΣΫτͷϧʔτσΟϨΫτϦͰ $
git init
ঢ়ଶͷ֬ೝ w ݱࡏͷ(JUϦϙδτϦͷঢ়ଶΛ֬ೝ͢Δʹ $ git status w 8PSLJOH%JSͰՃɾมߋ͞Εͨ༰ 4UBHJOHʹՃ͞Εͨ༰͕දࣔ͞ΕΔ w
ঢ়گ͕Α͘Θ͔Βͳ͘ͳͬͨΒͱΓ͋͑ͣ TUBUVTΛݟΔบΛ͚ͭ·͠ΐ͏
ίϛοτ w ػೳͷՃόάͷमਖ਼ͳͲ͖Γͷྑ͍࣌Ͱ ίϛοτ͠ঢ়ଶΛอଘ͓ͯ͘͠ w ·ͣ৽͘͠όʔδϣϯཧԼʹஔ͘ϑΝΠϧ มߋͨ͠ϑΝΠϧΛ4UBHJOHʹՃ͢Δ $ git add
<file1> <file2> …
ίϛοτ w 4UBHJOHͷ༰Λίϛοτͯ͠ཤྺʹొ͢Δ $ git commit -m "<commit message>" w
ίϛοτ࣌ʹϝοηʔδΛՃ͢Δ w มߋ༰Λॻ͍͓ͯ͘ͱޙͰ͔Γ͍͢ w ྫύʔαʔΛ࣮ w ྫҙຯղੳͰʙʙʙʹͳΔόάΛमਖ਼
ཤྺͷӾཡ w ཤྺΛӾཡ͢Δ$ git log w ίϛοτͷҰཡ͕ϋογϡɾϝοηʔδɾ࣌ͳͲ ͱͱʹදࣔ͞ΕΔ w ͦΕͧΕͷίϛοτϋογϡ
4)" Ͱ ҰҙʹಛఆͰ͖Δ ྫ5a00b5712a039bfea1e8055206ab697e3081247d w ΦϓγϣϯΛՃ͢Δͱͬͱ৭ʑݟΕΔ
ཤྺͷӾཡ w ಛఆͷίϛοτͷมߋ༰ΛݟΔ $ git show <commit>
ࠩͷӾཡ w ࠷ޙͷίϛοτͱ8PSLJOHͷࠩ $ git diff w ࠷ޙͷίϛοτͱ4UBHJOHͷࠩ $ git
diff --cached w ͋Δίϛοτ"ͱ͋Δίϛοτ#ͷࠩ $ git diff <commit A>...<commit B>
࠷ޙͷίϛοτ·ͰΔ w pMFPSEJSΛ࠷ޙͷίϛοτͷঢ়ଶʹ͢ $ git checkout <file or dir>
ίϛοτͷআ w ͋Δίϛοτ·Ͱআ͢Δ 8PSLJOH%JSͦͷ·· $ git reset --soft w
͋Δίϛοτ·Ͱআ͢Δ 8PSLJOH%JSॻ͖͑Δ $ git reset --hard
• man git / git help <subcommand> w IUUQTHJUTDNDPNEPD w
IUUQTUSBJOJOHHJUIVCDPNSFTPVSDFT ͞Βʹৄ͘͠