I do something that I think is somewhat unconventional but I really like it! And that is keep my actual home directory under version control. To accomplish this my .gitignore starts with * so that it ignores everything. Then I go in an specifically include files like !file.txt.
This means I don't have to deal with any symlinks or scripts when I pull updates. I also can edit the actual 'live' files and then commit those same files, which makes sharing between machines painless! I've written a few blog posts about my dotfiles!
I build developer tools and services at Microsoft (currently Codespaces, Live Share, IntelliCode) and maintain some OSS projects (CodeTour, GistPad, CodeSwing, WikiLens)
It definitely seems like many of the “dot file managers” are simply working around the fact that folks don’t want to make their home directory a Git repo. Have you run into any downsides with this solution? It certainly seems really simple.
Not any huge ones, but there are definitely some interesting side effects.
One if that I am always in a git repo now basically, so my bash indicator of if I'm in a git branch is slightly less meaningful
Two some tools (ex: ripgrep) use your .gitignore file as a generic ignore file when searching, so this needs to be worked around. I accomplish this my using something like rg --no-ignore --glob "!.git/*". I find I don't actually run into this too often, as usually I am running rg from within a different project directory, where it's local .gitignore is used so this isn't an issue.
Besides that everything works as expected! I've been doing it for a few years now and really enjoy the setup!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I put all my dotfiles that I want to share in a public repo that I host on Github
coreyja / dotfiles
My dotfile Repo
Coreyja's dotfiles
My dotfiles!
This started out as a fork from github.com/mathiasbynens/dotfiles but diverged enough that I cut the fork tie at some point.
Notably I run my dotfiles where my homedir is under git, so not aliasing/copying is required or provided here
Here are some blog posts I've written about my dotfiles:
Setup
Doing setup on a new machine so writing some documentation
Using
brew
installedbash
To update the shell we need to do two things both need root perms:
$(brew prefix)/bin/bash
to/etc/shells
so its an allowed shellsudo chsh -s "$(brew prefix)/bin/bash"
to set it as the default shell for the userI do something that I think is somewhat unconventional but I really like it! And that is keep my actual home directory under version control. To accomplish this my
.gitignore
starts with*
so that it ignores everything. Then I go in an specifically include files like!file.txt
.This means I don't have to deal with any symlinks or scripts when I pull updates. I also can edit the actual 'live' files and then commit those same files, which makes sharing between machines painless! I've written a few blog posts about my dotfiles!
Dotfiles - January 2018
Corey Alexander ・ Oct 27 '18 ・ 6 min read
This second one discusses some recent change to my dotfiles around Homebrew 2
Setting up new Laptop and Upgrading to Homebrew 2
Corey Alexander ・ Apr 19 '19 ・ 4 min read
It definitely seems like many of the “dot file managers” are simply working around the fact that folks don’t want to make their home directory a Git repo. Have you run into any downsides with this solution? It certainly seems really simple.
Not any huge ones, but there are definitely some interesting side effects.
One if that I am always in a
git
repo now basically, so my bash indicator of if I'm in agit
branch is slightly less meaningfulTwo some tools (ex:
ripgrep
) use your.gitignore
file as a generic ignore file when searching, so this needs to be worked around. I accomplish this my using something likerg --no-ignore --glob "!.git/*"
. I find I don't actually run into this too often, as usually I am runningrg
from within a different project directory, where it's local.gitignore
is used so this isn't an issue.Besides that everything works as expected! I've been doing it for a few years now and really enjoy the setup!