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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
3k
開発チームの新しいエンジニアメンバーがうまくやるには / newcomer-in-development-team
yammerjp
0
2.4k
Featured
See All Featured
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
580
Making the Leap to Tech Lead
cromwellryan
135
10k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
It's Worth the Effort
3n
188
29k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
990
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
450
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
680
Navigating Team Friction
lara
192
16k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
550
A Soul's Torment
seathinner
8
3.6k
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