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
290
GitのCLI操作を楽にするためにエイリアスを作った話
Daiki Nojiri
January 23, 2020
Tweet
Share
More Decks by Daiki Nojiri
See All by Daiki Nojiri
イメージで理解するgRPC
nojiri1098
0
330
今日から書けるリーダブルコード
nojiri1098
0
480
Other Decks in Programming
See All in Programming
CSC509 Lecture 06
javiergs
PRO
0
260
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
200
After go func(): Goroutines Through a Beginner’s Eye
97vaibhav
0
400
オープンソースソフトウェアへの解像度🔬
utam0k
16
2.9k
Writing Better Go: Lessons from 10 Code Reviews
konradreiche
0
1.3k
CSC305 Lecture 06
javiergs
PRO
0
240
Server Side Kotlin Meetup vol.16: 内部動作を理解して ハイパフォーマンスなサーバサイド Kotlin アプリケーションを書こう
ternbusty
3
200
CSC305 Lecture 04
javiergs
PRO
0
270
monorepo の Go テストをはやくした〜い!~最小の依存解決への道のり~ / faster-testing-of-monorepos
convto
2
500
ソフトウェア設計の実践的な考え方
masuda220
PRO
4
590
ALL CODE BASE ARE BELONG TO STUDY
uzulla
25
6.1k
CSC509 Lecture 05
javiergs
PRO
0
300
Featured
See All Featured
Being A Developer After 40
akosma
91
590k
Code Reviewing Like a Champion
maltzj
526
40k
Rails Girls Zürich Keynote
gr2m
95
14k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Scaling GitHub
holman
463
140k
Side Projects
sachag
455
43k
Building an army of robots
kneath
306
46k
Automating Front-end Workflow
addyosmani
1371
200k
Raft: Consensus for Rubyists
vanstee
140
7.1k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
22k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.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*͍ΖΜͳ͜ͱ͕Ͱ͖ΔͷͰ ͥͻͬͯΈ͍ͯͩ͘͞