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のCLI操作を楽にするためにエイリアスを作った話
Search
Daiki Nojiri
January 23, 2020
Programming
0
190
GitのCLI操作を楽にするためにエイリアスを作った話
Daiki Nojiri
January 23, 2020
Tweet
Share
More Decks by Daiki Nojiri
See All by Daiki Nojiri
イメージで理解するgRPC
nojiri1098
0
220
今日から書けるリーダブルコード
nojiri1098
0
270
Other Decks in Programming
See All in Programming
educure_カリキュラム生操作マニュアル.pdf
linew_official
0
780
Azure OpenAI Serviceのプロンプトエンジニアリング入門
tomokusaba
3
700
Git Lint
bkuhlmann
4
750
GraphQLサーバの構成要素を整理する #ハッカー鮨 #tsukijigraphql / graphql server technology selection
izumin5210
4
840
スキーマ駆動開発による品質とスピードの両立 - 私達は何故、スキーマを書くのか
kentaroutakeda
0
170
Elm Form Validation
bkuhlmann
0
510
見た目から始める生産性向上
ikumatadokoro
7
840
#phpcon_odawara オープン・クローズドなテストフィクスチャを求めて / open closed test fixtures
77web
3
230
AWS CDKコントリビュートTIPS / aws-cdk-contribution-tips
gotok365
2
180
Build Apps for iOS, Android & Desktop in 100% Kotlin With Compose Multiplatform (mDevCamp 2024)
zsmb
0
330
PHPの次期バージョンはこの時期どうなっているのか - Internalsの開発体制について - PHPカンファレンス小田原
youkidearitai
PRO
1
190
try! Swift Tokyo 初参加報告LT
hinakko2
0
220
Featured
See All Featured
Designing with Data
zakiwarfel
96
4.8k
Statistics for Hackers
jakevdp
789
220k
How GitHub (no longer) Works
holman
304
140k
Adopting Sorbet at Scale
ufuk
68
8.6k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Bash Introduction
62gerente
604
210k
Building an army of robots
kneath
300
41k
Six Lessons from altMBA
skipperchong
21
3k
Designing the Hi-DPI Web
ddemaree
276
33k
The Brand Is Dead. Long Live the Brand.
mthomps
49
28k
We Have a Design System, Now What?
morganepeng
43
6.7k
Become a Pro
speakerdeck
PRO
11
4.5k
Transcript
(JUͷ$-*ૢ࡞Λָʹ͢ΔͨΊʹ ΤΠϦΞεΛ࡞ͬͨ
ࠓճɺ ʮ$6*ͬͯ͜Μͳ͜ͱͰ͖ΔΜͩʯ ͱࢥͬͯΒ͏͜ͱ͕ඪͰ͢
ϒϥϯνΛΓସ͑Δʹ $ git checkout develop $ git switch develop ࠷ۙՃ͞Εͨ
ଧͭͷ͕ΊΜͲ͍͘͞ $ git checkout develop $ git switch develop
ΤΠϦΞεΛ࡞Γ·ͨ͠ $ git checkout develop $ git switch develop $
git co develop ˜
ΤΠϦΞεΛ࡞Δʹ શϢʔβͰ͑ΔΑ͏ʹ͢Δ $ git config --system alias.co checkout ࠓͷϢʔβ͚ͩͰ͑ΔΑ͏ʹ͢Δ $
git config --global alias.co checkout ࠓͷϦϙδτϦ͚ͩͰ͑ΔΑ͏ʹ͢Δ $ git config alias.co checkout
͍Ζ͍Ζ࡞ͬͯ·͢ [alias] a = add s = status b =
branch f = fetch cm = commit co = checkout st = stash stp = stash pop pushh = push origin HEAD pushf = push -f origin HEAD pulll = pull origin HEAD undo = reset --soft HEAD~ redo = commit -c ORIG_HEAD ~/.gitconfig
Ͱɼ·ͩΊΜͲ͍͘͞ $ git co develop
·ͨΤΠϦΞεΛ࡞Γ·ͨ͠ $ git co develop $ co develop ˜
ΤΠϦΞεΛ࡞Δํ๏ bash $ alias co='git checkout' >> ~/.bashrc $ source
~/.bashrc zsh $ alias co='git checkout' >> ~/.zshrc $ source ~/.zshrc fish $ alias co='git checkout’
͜Ε͍Ζ͍Ζ࡞ͬͯ·͢ alias s='git status' alias b='git branch' alias cm='git commit'
alias co='git checkout' alias st='git stash' alias stp='git stash pop' alias pulll='git pull origin HEAD' alias pushh='git push origin HEAD' alias undo='git reset --soft HEAD~' alias redo='git reset -c ORIG_HEAD' ~/.config/fish/fish.config
·ͩ͋Γ·͢
ϒϥϯν໊Λଧͭͷ͕ΊΜͲ͍͘͞ $ git branch add-manual-operation-for-ranking add-test-customer * develop fix/series-create $
co add-manual-operation-for-ranking $ co add-test-customer $ co fix-series-creation
͜Ε͔ΜͨΜʹ͠·͢ $ co add-manual-operation-for-ranking $ co add-test-customer $ co fix-series-creation
$ cb (change-branchͷҙຯ) ˜
͍ํ DCͱೖྗͯ͠&OUFS ϒϥϯνҰཡ͕දࣔ͞ΕΔ
͍ํ ΩʔϫʔυͰߜΓࠐΈ &OUFSͰϒϥϯν͕ΓସΘΔ
͜ΜͳΤΠϦΞεΛ࡞ͬͯ·͢ cb="git switch (string trim -l -c ' *' (git
branch | peco))" ~/.config/fish/fish.config
$6*͍ΖΜͳ͜ͱ͕Ͱ͖ΔͷͰ ͥͻͬͯΈ͍ͯͩ͘͞