Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
9
開発組織まわりで最近考えているあれこれ
vividmuimui
0
17
bundle-update.pdf
vividmuimui
0
120
Dependabot vs BundleUpdate+LockDiff
vividmuimui
0
81
あなたの知らないRuboCopの設定
vividmuimui
0
220
最近(2019/02/03)の #Ruby , #Rails , #Bundler 事情
vividmuimui
0
150
Jasperはいいぞ!
vividmuimui
0
48
Danger CI
vividmuimui
0
110
lock_diff の紹介
vividmuimui
0
98
Other Decks in Programming
See All in Programming
Microservices Platforms: When Team Topologies Meets Microservices Patterns
cer
PRO
1
1k
手が足りない!兼業データエンジニアに必要だったアーキテクチャと立ち回り
zinkosuke
0
640
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
400
WebRTC と Rust と8K 60fps
tnoho
2
2k
ViewファーストなRailsアプリ開発のたのしさ
sugiwe
0
450
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
5
2k
Flutter On-device AI로 완성하는 오프라인 앱, 박제창 @DevFest INCHEON 2025
itsmedreamwalker
1
100
Navigation 3: 적응형 UI를 위한 앱 탐색
fornewid
1
310
안드로이드 9년차 개발자, 프론트엔드 주니어로 커리어 리셋하기
maryang
1
110
React Native New Architecture 移行実践報告
taminif
1
150
【CA.ai #3】ワークフローから見直すAIエージェント — 必要な場面と“選ばない”判断
satoaoaka
0
240
複数人でのCLI/Infrastructure as Codeの暮らしを良くする
shmokmt
5
2.3k
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
Code Review Best Practice
trishagee
74
19k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.2k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
720
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
Unsuck your backbone
ammeep
671
58k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.2k
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.2k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
How to train your dragon (web standard)
notwaldorf
97
6.4k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
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