Email or username:

Password:

Forgot your password?
Top-level
Matt

@b0rk put EVERYTHING in git, so I can just revert/reset --hard HEAD to undo whatever mess I just created

7 comments
Julia Evans

@angermcs oh cool idea! what do you mean by EVERYTHING? (like do you put all your dotfiles in git? how does that work?)

Adam Williamson :fedora:

@b0rk
I've seen some people who actually put the repo on github. I don't know exactly how you go about conveniently applying the files to the right location on a system, though...maybe there's some tooling for it?
@angermcs

Justin Browne

@adamw @b0rk gnu stow is a good tool to use for this. You can create a repository for just the stuff you want to backup, and restore it all with a `stow -t ~ git vim bash rust ...`

⚡️

@adamw @b0rk @angermcs i do this - dot files on git

i use it to sync .zshrc, .ssh/config, .gitconfig, .tmux.conf, Brewfile, and a few other app configs

it's one of the reasons i feel more comfortable experimenting with changes on my shell and git configurations lately

having the files publicly on github is just for sharing with others; i like to see what others are aliasing or writing functions for

⚡️

@adamw @b0rk @angermcs to apply the files i do the following

1. git clone --bare <repo url> .dotfiles
2. alias dotfiles='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
3. dotfiles checkout
4. source ~/.zshrc

1. creates a bare clone
2. creates an alias for working with you dot files repository - good idea to also put this same alias in .zshrc
3. actually checkout the files from the repo, if you have issues here you may need to stash before checking out
4. source the shell configuration

Nicholas Weaver

@b0rk @angermcs
ln -s .{dotfile} /archive/nweaver/doftfiles/{dotfile}

wizzwizz4

@angermcs @b0rk I have been doing this for a couple of years, and it has only just occurred to me that this doesn't protect me from deleting the .git directory.

Go Up