Archive and delete a git branch

Blog

Head to the top of the git repository.

$ cd path/to/repo/top

Check out the branch you want, pull, update, whatever to put it into the state you want to archive.

$ git co branch-to-archive
$ git up
$ git pull
$ git whatever

Run this to archive the branch

$ git archive branch-to-archive | gzip > ../some/archive/path/repo-name-branch-name.YYMMDD.tar.gz 

Check the repo is what you want:

$ tar tvfz ../some/archive/path/repo-name-branch-name.YYMMDD.tar.gz | less

Delete the branch remotely and locally:

$ git push origin :branch-to-archive
$ git branch -D branch-to-archive

And, of course, I have this in a script.

The lack of cut and paste in 10.8's XQuartz is killing me.

MicroBlog

Strawberries

Daily Photo

Trolling the step-dad

Blog

A month or so ago, I loaned my mom my smaller ipad. She has a kindle, and enjoys reading on it. She had asked me about the ipad reading experience, so I offered to loan her mine, knowing I'd be back out to visit her in a couple weeks when I could pick it back up. In the meantime, I could "suffer" with the larger, heavier, so out-of-date (sarcasm, btw), larger ipad I have. The bigger one is destined for B's hands, but still in mine for a bit.

I figured this was a great plan. She could check it out without having to buy one, I wasn't going to be really out anything. Win-win.

What I didn't account for, however, was Eric discovering the ipad. More importantly, discovering my collection of books on the ipad.

I'm a big fan of paper books. I love the weight. I love the heft. I love the smell. I love the feel. Everything about a printed book just makes me happy (except, well, maybe the plot of a poorly written one). What I don't love, however, is travelling with a stack of books. So, I'm inclined to buy a book in ebook format for many books, with the kindle format being the easiest to use (curse you, Amazon).

Unsurprisingly, I have a lot of ebooks. Well, I have a lot of books. I happen to have a lot of ebooks, too.

Eric happened to want to read a large number of the books I have (unsurprisingly, including the Scalzi books). When I asked for the ipad back the last time I was out, Mom sheepishly asked to keep it for a little longer. Okay, I could do that.

So, with my current run of Jack Reacher books coming to a close, I've been looking at more books to read. I bought a couple, and, well, sent them immediately to the ipad.

See, when you open the kindle app on the ipad with a new book delivered to said ipad, the app will drop out of the current book being read and load the new book at the beginning. So, when Eric goes to read his current book on my ipad, it'll pop up with the books I have queued up, and he'll have to reselect the book he was reading. Just a small, trolling reminder that I'd like my ipad back.

Unless Eric decides he wants to know about content strategy development and something about the art of thinking clearly.

If so, I'm never getting that ipad back.

List the UNIX groups I'm in

Blog

Easy enough:

$ groups
users www-data
$

So much easier than, say, the concatenation of these:

$ grep `whoami` /etc/group | cut -f1 -d: 
www-data
$ grep :`grep $USER /etc/passwd | cut -f4 -d:`: /etc/group | cut -f1 -d:
users
$

Pages