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
230
GitのCLI操作を楽にするためにエイリアスを作った話
Daiki Nojiri
January 23, 2020
Tweet
Share
More Decks by Daiki Nojiri
See All by Daiki Nojiri
イメージで理解するgRPC
nojiri1098
0
250
今日から書けるリーダブルコード
nojiri1098
0
330
Other Decks in Programming
See All in Programming
CSC509 Lecture 12
javiergs
PRO
0
160
Remix on Hono on Cloudflare Workers
yusukebe
1
280
Kaigi on Rails 2024 〜運営の裏側〜
krpk1900
1
190
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
310
詳細解説! ArrayListの仕組みと実装
yujisoftware
0
580
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
860
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
6
1.7k
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
Better Code Design in PHP
afilina
PRO
0
120
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
Ethereum_.pdf
nekomatu
0
460
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Bash Introduction
62gerente
608
210k
Designing the Hi-DPI Web
ddemaree
280
34k
Happy Clients
brianwarren
98
6.7k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
Typedesign – Prime Four
hannesfritz
40
2.4k
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*͍ΖΜͳ͜ͱ͕Ͱ͖ΔͷͰ ͥͻͬͯΈ͍ͯͩ͘͞