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
tigとかaliasなし生活を送ってみて改めてgitを覚えてる話
Search
vividmuimui
August 01, 2018
Programming
0
120
tigとかaliasなし生活を送ってみて改めてgitを覚えてる話
original
https://vividmuimui.github.io/slides/git-learn-again/slides/
vividmuimui
August 01, 2018
Tweet
Share
More Decks by vividmuimui
See All by vividmuimui
あるチームでの技術選定で考えてること(外部向けに修正版)
vividmuimui
0
10
開発組織まわりで最近考えているあれこれ
vividmuimui
0
20
bundle-update.pdf
vividmuimui
0
120
Dependabot vs BundleUpdate+LockDiff
vividmuimui
0
87
あなたの知らないRuboCopの設定
vividmuimui
0
230
最近(2019/02/03)の #Ruby , #Rails , #Bundler 事情
vividmuimui
0
160
Jasperはいいぞ!
vividmuimui
0
49
Danger CI
vividmuimui
0
110
lock_diff の紹介
vividmuimui
0
100
Other Decks in Programming
See All in Programming
米国のサイバーセキュリティタイムラインと見る Goの暗号パッケージの進化
tomtwinkle
2
550
Agentic AI: Evolution oder Revolution
mobilelarson
PRO
0
150
クライアントワークでSREをするということ。あるいは事業会社におけるSREと同じこと・違うこと
nnaka2992
1
330
野球解説AI Agentを開発してみた - 2026/02/27 LayerX社内LT会資料
shinyorke
PRO
0
120
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
4
1.3k
文字コードの話
qnighy
44
17k
株式会社 Sun terras カンパニーデック
sunterras
0
2.1k
RAGでハマりがちな"Excelの罠"を、データの構造化で突破する
harumiweb
9
2.8k
grapheme_strrev関数が採択されました(あと雑感)
youkidearitai
PRO
1
210
AI時代でも変わらない技術コミュニティの力~10年続く“ゆるい”つながりが生み出す価値
n_takehata
2
720
Unity6.3 AudioUpdate
cova8bitdots
0
120
「やめとこ」がなくなった — 1月にZennを始めて22本書いた AI共創開発のリアル
atani14
0
370
Featured
See All Featured
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
540
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.8k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
62
51k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
170
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
270
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
380
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.3k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
480
GraphQLの誤解/rethinking-graphql
sonatard
75
11k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.1k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
760
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