It can also unstow and restow, ignore patterns, etc. Highly recommended.
One program which I'm thinking of that can make modifications of its own config files is znc. weechat is another. There might be some other random program that does this too. I'm concerned that using stow for them might lead to disaster.
Any advice from someone who's tried it with apps like that?
$ touch file
$ ln -s file symlink
$ echo text > symlink
$ cat file
One way to work around this is to symlink the entire directory.
With the blog post's solution, when you want to revert to an older revision of, say, your .vim or .emacs.d dotfiles you're also going to be automatially reverting your .bash and whatever other random dotfiles you have. With the latter solution, when you revert your dotfiles/vim or dotfiles/emacs subdirectory, you only get an older revision of your vim or your emacs files.
Does that make sense?
> Once you have pushed a commit to GitHub, you should consider any data it contains to be compromised.
I've never understood why people want to dump their config files on a public server. The "reasons" given are unconvincing:
* "Backup, restore, and sync" -- I don't keep the rest of my backups out in the open.
* "Learn" -- Maybe, but I prefer learning from stuff people have taken the time to deliberately share.
* "Share" -- I'd rather explicitly choose what I share.
The reasons they offer might not be the most convincing, but they're something, which is better than nothing. Suppose you have a bunch of configuration that you're sure contains no sensitive information and you've decided to sync it between machines somehow. Why not use github, assuming you're already a github user.
When "scp" and "rsync" exist, and git is a distributed version control system, it's hard to justify unnecessarily exposing data on the web.
Mine are on Github, but in a private repo. They're nothing special at all - there are better examples for others to learn from.
As a backup, or for a refresh/new machine - what easier way than to clone my own repo? I guess I could them on another disk, a USB drive say, but will I really remember to plug it in to push changes? It would certainly be easier just to use Github.
The fact that Amazon has paid engineers to write a bot that scans for API keys suggests that most people aren't that careful, or willing to spend $7/mo so they can use private repos. It sounds like you're doing it right, but most people seem to be doing it wrong.
The fact that GitHub has not paid engineers to write a bot that scans for API keys, RSA keys, and other common credentials mistakenly committed and dropping the files from UI view / search indices without notification and explicit permission surprises me a lot more. The company seems to be full of great engineers and UI people; doing something like this would vastly improve the UX of developers beginning to use the platform, and would likely not get in the way of seasoned ones.
> most people aren't ... willing to spend $7/mo so they
> can use private repos
Still, there's Bitbucket and others, or self-hosted if so inclined.
Used this to get a new laptop up and running immediately; the only step beyond that was a quick `brew list` to install packages that those dotfiles might lean on.
Rcm lets you specify which files should always be linked, and which should only be linked on a specific host, which means I factor out my dotfiles into "modules" and load exactly the right ones.
"dit" is a dotfile tool that isn't concerned with being fancy. It uses git hooks so all that's required of you to update your dotfiles is "git commit." It's written in Ruby, and is entirely open source.
I created it as a much easier, much simpler alternative to rcm or homesick. It doesn't have nearly the same amount of features (it's around 200 lines of Ruby), and it is only concerned with syncing dotfiles to the home directory.
I'd love to get feedback on the program, my programming, etc.
Unless you have private repos I guess.
My solution is to use Dropbox to store all my configuration files, then use symlinks to the default locations.
I used to have my configuration files on Github, but I decided to remove them, first dotfiles, then recently my emacs config, as I have the idea that they are too personal, and I have to spend some certain effort to keep them publishable, e.g. use files for private data, like api keys, emails, Gnus settings, feed lists. Now I'll be able to check these in too, freely.
It lets you mix platform-specific bits in the middle of a file, do basic macro substitution, and some other things.
(Now that I'm using a mac occasionally, I use more of the multi-platform features than I claim in that post.)
Since i often work on systems i don't directly own or have an own account on, i use
eval "$(wget -O - https://myhost/.bashrc)"
to inject my bashrc into the current bash session to get my prompt, aliases and shortcuts ready without making changes to the fs. The functions defined in .bashrc help with managing pubkeys and loading other dotfiles.
gitsick clone <name> <url>
The files will be deployed directly to your $HOME, without symlinks, and from then on `gitsick <name>` is just a wrapper around Git such that the $GIT_DIR is stored in one place and your $WORK_TREE is $HOME.
Anyone got any suggested reading on this topic? More than just dotfiles but actually automating installing software etc.
This post is about how you can automated some of that so you can easily replicate the environment you're used to everywhere.
Some examples would include .bashrc for running commands automatically when bash starts, .vimrc for vim preferences, .ssh/ for storing SSH keys and settings, etc.
I've got four separate repos: one for VIM, one for bash, one for SSH keys, and a miscellaneous one (.inputrc and friends).