Month: April 2020

splitting the last git commit into two

April 23, 2020 C/C++ development and debugging. No comments , ,

In the blog post, Split a commit in two with Git, Emmanuel provides a super clear explanation of how to split an old commit into multiple commits, separating that commit into different commits, each with a subset of the files initially committed.

It took me a while before I could figure out how to apply this to the very last commit.  Here’s the required git magic:

[sourcecode language=”bash”]
git log -n 1 > m
git reset HEAD^
git add …
git commit -m "First part"
git add …
git commit -m "Second part"

The differences are really to just skip the first and last rebase steps (don’t do an interactive rebase, and don’t continue that rebase when done.) This was probably obvious to the author of the more general instructions.

Note that before resetting HEAD to the previous commit, I collect the current commit message, under the assumption that portions of it will be used in either of the two (or more) new commit messages.  If you don’t do that, you can fish it out of your history by looking at ‘git reflog’ to see what the message was before mucking around with HEAD.

How absurd: facebook marketplace has promoted me to arms-dealer.

April 7, 2020 Incoherent ramblings No comments , ,

I tried giving away some of Lance’s old model rocket stuff, but facebook has determined, even after appeal, that I am an arms dealer:

My listing description was:

Rocket launching base and trigger, a few engines (2x B6-6 and 2x 1/2A3-T4) and igniters, and some recovery wadding. The metal post that was originally on the launching base got lost somewhere along the way, but any straight conductive rod of the same diameter should do the job.

Available for porch pickup (M4X1C2, cabbagetown: Parliament and Wellesley)

The message from them, after my appeal, specifically says that this has been determined to be a weapon:

It’s been a long time since I’ve been in trouble with the law for weapons sales (there was that time back in grade 3 when I made the best ninja stars in my school and opened a little business for myself.)  I used to call myself a drug pusher when I worked for Bowles pharamacy, making sure that all the little old ladies (and that super stinky guy at 59 Edgewood) got their fixes.  Now I can add arms dealer to my resume along with drug dealer.

Incidentally, if you want some old model rocket stuff, including 4 weapons grade engines, please send me a message, and you can have it.