apt-get install vcsh
I finally got around to package vcsh and David Bremner was kind enough to sponsor it. vcsh is available in testing, unstable, and squeeze-backports. Also, Ubuntu seems to have copied it over into their repositories automagically.
As you probably don't know, vcsh is a tool to manage config files in git. Say you want to maintain one repository for zsh, one for vim, one for ssh, one for mplayer, and one for mr, but obviously there can only be one .git in $HOME. vcsh helps by moving $GIT_DIR into $XDG_CONFIG_HOME/vcsh/repo.d/ but keeping $GIT_WORK_TREE in $HOME.
The splitting of configuration sets into separate repositories allows you avoid checking out, say, mplayer's config on your servers, or checking out your ssh config at work.
If this sounds complicated, it's not; vcsh hides all of the dirty details from you. vcsh integrates nicely with mr by means of a plugin, making handling your configurations even more trivial. If you do get stuck along the way, simply drop into #vcs-home on irc.oftc.net or send email to the vcs-home mailing list.
popcon tells me that there are more users than I know about directly, so pipe up if you're one of them. And if you are one of the people who have it installed but don't use it, I am even more interested. I would love to know why so I can improve it.
Long story short, if you care about the integrity and/or history of your configuration, or if you use one or more computers, you should definitely give vcsh a try.
Any kind of feedback appreciated :)
Hello Planet :)
You may have seen my ancient blog posts pop up on the planet when XTaran was nice enough to add me to the planet's aggregation. Not quite sure why ikiwiki/planet decided to do this, but I will try to find out. If you have an idea, which does not involve re-spamming the feed, do let me know. In any case, expect mostly shell-related posts from me.
And, as every year, I will be going to FOSDEM.
Cleaning up a local repo:
git rebase -s ours -i --autosquash HEAD~20
Allowing the remote to be clobbered:
git config receive.denyNonFastForwards false
Pushing from local repo:
git push --force
Safe-guarding the remote once again:
git config receive.denyNonFastForwards true
In case you are rebasing an ikiwiki, you want to clobber the local checkout on your server, as well:
git remote update && git reset --hard @{u}
Done.
This might be interesting if you are using git-annex with one default remote and don't modify files once added:
git config [--global] alias.annex-push \
'!git pull && git annex add . && git annex copy . --to $REMOTE --fast --quiet && git commit -a -m "$HOST $(date +%F--%H-%M-%S-%Z)" && git push'
Optional parameters include --global (you will need to name all your remotes the same for this) and --fast (don't use this if you modify files). The timestamp is not-quite-ISO-8601, but it\'s human-readable and trivial to parse for computers.
Ben Hutchings writes:
There is an alternative to using C-c, and that is M-#. This adds a '#' to the start of the line, commenting it out, and then behaves as if you pressed Return. The result is that the command is cancelled but still remains on-screen and in your history. You can then copy the command later using the mouse or keyboard.
Naturally, there is a zsh equivalent for this (there always is...): pound-insert. Quoth the manpage:
pound-insert
If there is no # character at the beginning of the buffer, add one to the beginning of each line. If there is one, remove a # from each line that has one. In either case, accept the current line. The INTERACTIVE_COMMENTS option must be set for this to have any usefulness.
So if you want the same for zsh, a simple
bindkey '^[#' pound-insert
is all you need.
Update:
Clint Adams noted another way to do (almost) the same.
Here, there be blog posts.
For now, this blog is more or less a placeholder.
In the past, I created a site to share thoughts about life, the universe and everything. Said site has never been picked up by archive.org and a good thing also; the HTML was horrible.
Then, this new craze of "weblogs" arrived and I decided to go against the mainstream and not start another instance of those.
As blogs and microblogs have become a useful addition to partake in some interesting discussions, I decided to give the whole thing another spin.
All that being said, I do not expect to write a lot. You have been warned.
A good place to start are the full lists of all posts and comments, respectively.