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
260
今日から書けるリーダブルコード
nojiri1098
0
340
Other Decks in Programming
See All in Programming
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
200
バグを見つけた?それAppleに直してもらおう!
uetyo
0
200
React 19でお手軽にCSS-in-JSを自作する
yukukotani
5
500
テストケースの名前はどうつけるべきか?
orgachem
PRO
0
160
Webエンジニア主体のモバイルチームの 生産性を高く保つためにやったこと
igreenwood
0
340
「Chatwork」Android版アプリを 支える単体テストの現在
okuzawats
0
200
Amazon S3 NYJavaSIG 2024-12-12
sullis
0
120
Оптимизируем производительность блока Казначейство
lamodatech
0
800
良いユニットテストを書こう
mototakatsu
11
3.4k
Monixと常駐プログラムの勘どころ / Scalaわいわい勉強会 #4
stoneream
0
310
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
1.1k
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
570
Featured
See All Featured
Building Applications with DynamoDB
mza
92
6.1k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
How to train your dragon (web standard)
notwaldorf
88
5.8k
Typedesign – Prime Four
hannesfritz
40
2.4k
Why Our Code Smells
bkeepers
PRO
335
57k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
How STYLIGHT went responsive
nonsquared
96
5.2k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.2k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Designing on Purpose - Digital PM Summit 2013
jponch
116
7k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
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*͍ΖΜͳ͜ͱ͕Ͱ͖ΔͷͰ ͥͻͬͯΈ͍ͯͩ͘͞