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
dotfilesを管理しよう / get-started-with-dotfiles-mana...
Search
yammerjp
January 26, 2023
2k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
dotfilesを管理しよう / get-started-with-dotfiles-management
2023/01/26 CTOA 若手エンジニアコミュニティ LT会
yammerjp
January 26, 2023
More Decks by yammerjp
See All by yammerjp
生成AIとの対話から、概念をみつけ、名前をつける / Name it with generative AI
yammerjp
2
3.2k
awkでつくってわかるWebアプリケーション / Web Application Implementation in awk
yammerjp
14
12k
awk basics
yammerjp
1
1k
jpro: JSON Processor
yammerjp
0
1k
クイズを作ってPHPに親しむ / Make quizzes and get familiar with PHP
yammerjp
2
2.4k
比較演算を壊してみる / php-break-comparison
yammerjp
1
1.6k
切り取り方を工夫してアプリケーションを漸進的に改善する / Incremental improvement by devising application change boundaries
yammerjp
1
2.5k
社用PCのdotfiles管理 / dotfiles-in-company
yammerjp
1
3.1k
開発チームの新しいエンジニアメンバーがうまくやるには / newcomer-in-development-team
yammerjp
0
2.4k
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
432
67k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
580
エンジニアに許された特別な時間の終わり
watany
109
250k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Utilizing Notion as your number one productivity tool
mfonobong
4
600
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
370
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
900
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
850
Designing for humans not robots
tammielis
254
26k
How to Ace a Technical Interview
jacobian
281
24k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
76k
A better future with KSS
kneath
240
18k
Transcript
dotfiles を管理しよう 2023/01/27 CTO 協会 若手エンジニアコミュニティ LT 会 やんまー @yammerjp
1
自己紹介 やんまー @yammerjp 中山 慶祐 GMO ペパボ株式会社 Web アプリケーションエンジニア 月刊誌
Software Design にて 「開発環境 探求の道」を連載中 https://yammer.jp 2
dotfiles とは 3
.bashrc 4
.zshrc 5
.gitconfig 6
.vimrc 7
dotfiles とは? Unix/Linux における ユーザごとの アプリケーションの設定ファイル .bashrc 、.zshrc 、.vimrc 、.gitconfig
、、、等々 ホームディレクトリに、ドットで始まるファイル名のものが多い 8
dotfiles の例 .gitconfig [user] name = Keisuke Nakayama email =
[email protected]
[include] path = ~/.config/git/config-company [alias] l = log --graph \ --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' \ --abbrev-commit --date=relative sw = !git branch --all --format=\"%(refname:short)\" | fzf | xargs git checkout https://github.com/yammerjp/dotfiles/blob/master/.config/git/config 9
dotfiles の利用例 git l で、ブランチのマージ 状況を視覚的に表示したログ を表示 https://github.com/yammerjp/dotfiles/blob /3b3813ed3f9c8e06006fef14d30df14cb3 228738/.config/git/config#L41
10
dotfiles の利用例 NeoVim 上でショートカット sf を押して、リポジトリ内の 記述を曖昧検索して開く https://github.com/yammerjp/dotfiles/blob /3b3813ed3f9c8e06006fef14d30df14cb3 228738/.config/nvim/init.vim#L121
https://github.com/yammerjp/dotfiles/blob /3b3813ed3f9c8e06006fef14d30df14cb3 228738/.config/nvim/init.vim#L171 11
今日は設定の中身ではなく .. 12
dotfiles の管理 13
14
dotfiles の管理 GitHub にある「dotfiles 」リポジトリ 変更履歴を記録できる 他のマシンへ設定を適用しやすい そのほかにも Public リポジトリであれば、他の人へ共有しやすい
開発環境を構成するツールやシェルスクリプトなどに詳しくなる 例: yammerjp/dotfiles 15
dotfiles 管理をはじめる GitHub にリポジトリを作る* ... https://github.com/new ファイルをコピーしてcommit 、push $ git
clone https://github.com/ あなたのGitHub ユーザ名/dotfiles.git ~/dotfiles $ cd dotfiles $ cp ~/.gitconfig ~/dotfiles/.gitconfig $ git add .gitconfig $ git commit -m "Add .gitconfig" $ git push origin main * 各ファイルの中身を公開して良いかわからなければ、ひとまずPrivate にしておくとよ いだろう 16
ホームディレクトリ のファイルを Git で 管理する シンボリックリンクを用いる Git リポジトリにあるファイル を、ホームディレクトリから 参照可能にする
$ mv ~/.gitconfig ~/.gitconfig.org $ ln -s ~/dotfiles/.gitconfig ~/.gitconfig 17
ln コマンド以外で管理する Git のbare リポジトリを使う $ alias dotfiles='git --git-dir=$HOME/.dotfiles --work-tree=$HOME'
Dotfiles: ベア Git リポジトリに保存する最もよい方法 - Atlassian Git Tutorial dotfiles の管理ツールを使う chezmoi, yadm, Dotbot, rcm, GNU Stow, ... 18
dotfiles の管理、はじめてみませんか? 自分好みにカスタマイズして素早く効率的に作業できる 他のマシンでも環境を再現できる ソフトウェアエンジニアの工具箱* ともいえるかもしれない (*)https://scrapbox.io/june29/ 父親の工具箱 19