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
260
GitのCLI操作を楽にするためにエイリアスを作った話
Daiki Nojiri
January 23, 2020
Tweet
Share
More Decks by Daiki Nojiri
See All by Daiki Nojiri
イメージで理解するgRPC
nojiri1098
0
300
今日から書けるリーダブルコード
nojiri1098
0
420
Other Decks in Programming
See All in Programming
ruby.wasmで多人数リアルタイム通信ゲームを作ろう
lnit
2
280
A2A プロトコルを試してみる
azukiazusa1
2
1.2k
Systèmes distribués, pour le meilleur et pour le pire - BreizhCamp 2025 - Conférence
slecache
0
110
Result型で“失敗”を型にするPHPコードの書き方
kajitack
4
500
High-Level Programming Languages in AI Era -Human Thought and Mind-
hayat01sh1da
PRO
0
540
Enterprise Web App. Development (2): Version Control Tool Training Ver. 5.1
knakagawa
1
120
すべてのコンテキストを、 ユーザー価値に変える
applism118
2
880
明示と暗黙 ー PHPとGoの インターフェイスの違いを知る
shimabox
2
370
生成AIコーディングとの向き合い方、AIと共創するという考え方 / How to deal with generative AI coding and the concept of co-creating with AI
seike460
PRO
1
330
設計やレビューに悩んでいるPHPerに贈る、クリーンなオブジェクト設計の指針たち
panda_program
6
1.6k
Google Agent Development Kit でLINE Botを作ってみた
ymd65536
2
200
プロダクト志向なエンジニアがもう一歩先の価値を目指すために意識したこと
nealle
0
110
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
181
53k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.8k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
700
Mobile First: as difficult as doing things right
swwweet
223
9.7k
Producing Creativity
orderedlist
PRO
346
40k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
22k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
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*͍ΖΜͳ͜ͱ͕Ͱ͖ΔͷͰ ͥͻͬͯΈ͍ͯͩ͘͞