Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
ghqでソースコードを管理しよう/2021-03-23-llt20
Search
Satoshi SAKAO
March 23, 2021
Programming
350
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ghqでソースコードを管理しよう/2021-03-23-llt20
社内のLTイベント「えるLT Vol.20 オンライン」で発表した資料です
Satoshi SAKAO
March 23, 2021
More Decks by Satoshi SAKAO
See All by Satoshi SAKAO
Testcontainers/2024-11-20-llt32
ottijp
0
120
Pkl/2024-04-17-llt31
ottijp
0
130
JavaScriptのデバッグ/2023-09-04-llt30
ottijp
0
200
CDK for TerraformでAzureリソースをデプロイする/2023-05-15-llt29
ottijp
1
360
TWELITEへの誘い/2022-12-27-llt28
ottijp
0
190
ビルドツールBazelを触ってみた/2022-09-28-llt27
ottijp
0
230
HashiCorp Vaultを使ったシークレットのセキュアな一元管理 〜Ansibleを添えて〜/2022-07-12-llt26
ottijp
0
190
AWSインフラのデプロイをCDKでカイゼンする/2022-03-23-llt25
ottijp
0
130
Amazon Timestreamでデータ補間/2021-12-27-llt24
ottijp
0
130
Other Decks in Programming
See All in Programming
すこし踏み込む CancellationToken
htkym
2
1k
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
4
3.7k
巨大モノリシックアプリ モダン化大作戦
ktcryomm
1
1.1k
スマート反転とウェブアクセシビリティ
camiha
0
210
Agents on Rails - Rails at Scale 2026
irinanazarova
0
250
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
250
個人開発基盤をまるごとCloudflareに引っ越して爆速で総合的体験を向上させた話
tinykitten
0
210
iOSDC Japan 2026 - Swiftで作って学ぼう!データベース自作入門
kaseken
2
340
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
3.5k
AGENTS.md Is Not Enough:Build Skills, Don't Download Them
lx_t
0
130
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
360
iOSDC2026登壇資料.pdf
riofujimon
0
180
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
187
23k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
520
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
It's Worth the Effort
3n
188
29k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
520
Prompt Engineering for Job Search
mfonobong
0
460
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
560
Darren the Foodie - Storyboard
khoart
PRO
4
3.9k
Transcript
ghqでソースコードを管理しよう Satoshi SAKAO えるLT Vol.20 2021-03-23 1
話すひと 2 🏢 インフォコム株式会社 品質マネジメント推進室 👨🔧 ソフトウェアエンジニア 🛠 JS (ES6)
/ Node.js / GCP / IoT / iOS (Swift) 💖 猫,テクテクライフ(ランク: 19) Satoshi SAKAO @ottijp
git clone • リモートリポジトリをどこにクローンしてますか? • クローンしたリポジトリが点在してませんか? • クローンしたリポジトリに容易にアクセスできますか? 3
ghq • https://github.com/x-motemen/ghq • リモートリポジトリの管理ツール • 特定のディレクトリ構造に従ってクローンしてくれる • Nature RemoのCTOの方がメインコントリビュータ兼スポンサ
4
ディレクトリ構造 5 ~/ghq |-- code.google.com/ | `-- p/ | `--
vim/ `-- github.com/ |-- google/ | `-- go-github/ |-- motemen/ | `-- ghq/ `-- urfave/ `-- cli/ <ghq root> <host> <user> <repo>
demo • vim というテキストエディタのソースをクローンする • GitHubなら <user>/<repo> の省略形式でOK • ghq
get vim/vim 6
課題 • 一元管理はできるようになったが,リポジトリへのアクセスは? • ghq look という機能があるが, リポジトリ名を完全に覚えている必要がある 7
そこで fzf 8 https://github.com/junegunn/fzf
リポジトリのあいまい検索&移動 9 fzf-src() { local selected selected=`ghq list --full-path |
fzf --query="$LBUFFER"` if [ -n "$selected" ]; then BUFFER="builtin cd $selected" zle accept-line fi zle reset-prompt } zle -N fzf-src bindkey '^Xs' fzf-src
demo • ^Xs で検索開始 • fzfで選択したら自動で移動 10
11 やったね 🥴🎉
まとめ • ghq を使ってソースコードを一元管理しよう • fzf は全人類が使おう 12
13 Appendix
install 14 # windows scoop install ghq # mac brew
install ghq # go go get github.com/x-motemen/ghq
リポジトリの削除 • 手動です • rm -rf $(ghq root)/foo/bar/hoge 15
fzf の活用例 • ブックマークのあいまい検索&移動 • 実行可能コマンドのあいまい検索&実行 • https://github.com/junegunn/fzf.vim 16