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
tigとかaliasなし生活を送ってみて改めてgitを覚えてる話
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
vividmuimui
August 01, 2018
Programming
140
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
tigとかaliasなし生活を送ってみて改めてgitを覚えてる話
original
https://vividmuimui.github.io/slides/git-learn-again/slides/
vividmuimui
August 01, 2018
More Decks by vividmuimui
See All by vividmuimui
あるチームでの技術選定で考えてること(外部向けに修正版)
vividmuimui
0
21
開発組織まわりで最近考えているあれこれ
vividmuimui
0
49
bundle-update.pdf
vividmuimui
0
130
Dependabot vs BundleUpdate+LockDiff
vividmuimui
0
110
あなたの知らないRuboCopの設定
vividmuimui
0
260
最近(2019/02/03)の #Ruby , #Rails , #Bundler 事情
vividmuimui
0
170
Jasperはいいぞ!
vividmuimui
0
61
Danger CI
vividmuimui
0
120
lock_diff の紹介
vividmuimui
0
110
Other Decks in Programming
See All in Programming
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
380
AIに “答え“を書かせるのを やめてみた
___akari11
0
120
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
220
dotNET_vulnclicker_intro.pdf
deka_morita
0
140
Jetpack Compose Mechanisms
skydoves
3
820
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
170
最近”作らせてる” ローカルAIアプリの話
akit37
0
480
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
5
5.2k
Performance Optimization With LLMs
xleitix
0
140
AI主導のプログラミング学習アプリを作ってみた
econanringo
0
180
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
190
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
Featured
See All Featured
Building Adaptive Systems
keathley
44
3.3k
Paper Plane (Part 1)
katiecoart
PRO
2
12k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
560
Heart Work Chapter 1 - Part 1
lfama
PRO
10
37k
WENDY [Excerpt]
tessaabrams
14
40k
Embracing the Ebb and Flow
colly
88
5.2k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
730
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
Transcript
tig とかalias なし生活を送 tig とかalias なし生活を送 ってみて改めてgit を覚えて ってみて改めてgit を覚えて
る話 る話 2018/08/01 社内LT @vividmuimui 1
はじめに はじめに ここ2,3 週間ぐらい、Git/Github の研修資料を作るために、tig やgit alias を封 印してみてます。 その中で今まで知らなかったこと、見たことはあるけど忘れていたものとか
を発表するLT です。 tig については https://qiita.com/vivid_muimui/items/7e7a740e6537749de0c0 2
注意 注意 難しい話とかトリッキーな話とかではないです。基本的な話しかないです! 人によっては当たり前のこと多いかと思いますが! 優しい目で見てください! 3
目次 目次 add -u reset –mixed, –soft, –hard show HEAD~^2~~^~^2
HEAD, @ –staged is a synonym of –cached di topic..master/topic…master 4
add -u add -u 対象となるファイルは と一緒です。 や しか知らなかったので地味に便利かなと思っています。 は少し躊躇するし、 や
などでコンフリクトしてコ ンフリクト解消したときとかにも便利そう( 予感) https://git-scm.com/docs/git-add -u, --update update tracked files 5
reset –mixed, –soft, –hard reset –mixed, –soft, –hard 今回改めて覚えるまで、 デフォルトのオプションがどれかもよくわかってなかったし、
しか普 段使ってなかったので、 と の違いもよくわかったなかったでした。 https://git-scm.com/docs/git-reset 6
reset –mixed, –soft, –hard reset –mixed, –soft, –hard デフォルトは と
どちらかわかりますか? と の違いを理解できますか? 7
reset –mixed, –soft, –hard reset –mixed, –soft, –hard 詳しくは この記事
を! http://d.hatena.ne.jp/murank/20110327/1301224770 --soft --mixed( 同等) --hard 影響度 小 順 以下 --soft HEAD 位置 変更 影響 --mixed ( ) HEAD 位置 変更 影響 --hard HEAD 位置 変更 http://d.hatena.ne.jp/murank/20110327/1301224770 8
show HEAD show HEAD ~ ( ) ~世代前 指定 ^
( ) 複数 親 指定 https://qiita.com/chihiro/items/d551c14cb9764454e0b9 9
show HEAD show HEAD ~ ( ) ~世代前 指定 https://qiita.com/chihiro/items/d551c14cb9764454e0b9
10
show HEAD show HEAD ^ ( ) 複数 親 指定
https://qiita.com/chihiro/items/d551c14cb9764454e0b9 11
show HEAD show HEAD https://qiita.com/chihiro/items/d551c14cb9764454e0b9 12
HEAD, @ HEAD, @ ( ちなみに、1.8.5 は2013 年年末ごろにリリースされてます。) git のv1.8.5
からは、大文字「HEAD 」の4 文字を打たな くて済むよう「@」というエイリアスが用意された http://tech.aainc.co.jp/archives/6740 Instead of typing four capital letters “HEAD”, you can say “@” now, e.g. “git log @”. https://raw.githubusercontent.com/git/git/master/Documentation/RelNotes 13
HEAD, @ HEAD, @ とか書くことができて便利 (rb = rebase) 14
–staged is a synonym of –cached –staged is a synonym
of –cached よりも のほうが絶対理解しやすいはず。 ( なんでcached という名前なのか、は理解してないです ) https://git-scm.com/docs/git-di git diff --cached git diff --staged 15
diff topic..master/topic…master diff topic..master/topic…master ちがいわかりますか? git diff topic master git
diff topic..master git diff topic...master 16
diff topic..master/topic…master diff topic..master/topic…master https://yakst.com/ja/posts/4116 17
git diff foo..bar git diff foo bar 完全 同 2
foo bar 最新 変更同士 違 表示 一方 git diff foo...bar 2 bar 最新 変更 違 表示 通常 2 間 共通 最後 https://yakst.com/ja/posts/4116 18
diff topic..master/topic…master diff topic..master/topic…master github のPR をだすときのURL が のように であることがこれで納得いきますね
https://github.com/foo/bar/compare/branchA...branchB 19
終わり 終わり tig や各種エディタ拡張とかとても便利だし、普段の開発ではalias や peco(history) で特定のコマンドしか使うことないと思います。 素のgit を触ることあまりないとは思いますが、 たまーに素のgit
を触ってみると新しい発見があるかもしれません! ( 読んだほうが早くね!とかそういう系の正論は ) Reference manual 20