Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
git switch & git restore
Search
oohira
January 21, 2020
Programming
140
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
git switch & git restore
oohira
January 21, 2020
More Decks by oohira
See All by oohira
私のエンジニア人生に影響を与えた技術書 / tech books that influenced my engineer life
oohira
1
310
コードレビューを通す技術 / technique to pass code review
oohira
1
140
Progressive OSS Contribution
oohira
1
180
Why Mob Programming?
oohira
3
2.5k
朝の15分読書会ふりかえり / 15min-reading-retrospective
oohira
0
180
朝の15分読書会のススメ
oohira
0
490
Ansibleで3台のビルドサーバーを3分で構築した話 / Set up build servers in 3 min by Ansible
oohira
0
250
知っておくと便利なcurl
oohira
0
280
git-svnで始めるボッチのためのGit
oohira
0
5k
Other Decks in Programming
See All in Programming
すこし踏み込む CancellationToken
htkym
2
1.5k
一人だけ、Kiroが静止する日
hideg
0
140
速習iPhone Duo対応
yuukiw00w
2
910
WebRTC映像をAirPlayに対応させる挑戦.pdf
monolithic_adam
0
330
iOSDCのペンライトを自動制御したい!
akkeylab
0
280
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
9.2k
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
8
5.2k
iOSDC2026登壇資料.pdf
riofujimon
0
200
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
4.5k
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
410
The Rails Doctrine Decade
koic
2
430
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
4
410
Featured
See All Featured
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
390
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
Building Applications with DynamoDB
mza
96
7.2k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.3k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
500
Prompt Engineering for Job Search
mfonobong
0
470
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
730
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.3k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
530
Transcript
switch & restore ϏΞόογϡେฏ !PPIJSB
4VCKFDU<"//06/$&>(JUW 'SPN+VOJP$)BNBOPHJUTUFS!QPCPYDPN %BUF'SJ "VH 2 5XPOFXDPNNBOETHJUTXJUDIBOEHJUSFTUPSFBSFJOUSPEVDFEUP TQMJUDIFDLJOHPVUBCSBODIUPXPSLPOBEWBODJOHJUTIJTUPSZBOE DIFDLJOHPVUQBUITPVUPGUIFJOEFYBOEPSBUSFFJTIUPXPSLPO BEWBODJOHUIFDVSSFOUIJTUPSZPVUPGUIFTJOHMFHJUDIFDLPVU
DPNNBOE
• HJUTXJUDI • ϒϥϯνΛมߋ͢Δૢ࡞ • HJUSFTUPSF • ϑΝΠϧΛมߋ͢Δૢ࡞ ˞·ͩFYQFSJNFOUBMɻHJUDIFDLPVU͑Δ 3
HJUDIFDLPVU͕େ͖͍͔Βׂ
• ϒϥϯνͷΓସ͑ • ϒϥϯνͷ࡞ˍΓସ͑ • ͭલͷϒϥϯνʹΔ 4 HJUTXJUDI $ git
switch topic # git checkout topic $ git switch -c topic # git checkout -b topic $ git switch - # git checkout -
• ϑΝΠϧͷϩʔΧϧͷमਖ਼Λ͢ • ϑΝΠϧΛಛఆͷίϛοτʹ͢ 5 HJUSFTUPSF $ git restore
README # git checkout -- README $ git restore --source <commit> README # git checkout <commit> -- README
• εςʔδϯάΤϦΞʹ͋ΔϑΝΠϧΛ͢ • εςʔδϯάΤϦΞϩʔΧϧ͢ 6 HJUSFTUPSF $ git restore
--staged README # git reset README $ git restore --source HEAD --staged --worktree README # git reset --hard README
7 ઈରDPͷํ͕ଧ͍ͪ͢ $ vi ~/.gitconfig ... [alias] co = checkout
sw = switch
• )JHIMJHIUTGSPN(JU5IF(JU)VC#MPH • IUUQTHJUIVCCMPH IJHIMJHIUTGSPNHJU • (JUHJUTXJUDI%PDVNFOUBUJPO • IUUQTHJUTDNDPNEPDTHJUTXJUDI •
(JUHJUSFTUPSF%PDVNFOUBUJPO • IUUQTHJUTDNDPNEPDTHJUSFTUPSF 8 ࢀߟจݙ