Here’s what I’m doing. My master branch has a bug in it and I have identified an old commit using git bisect which is the latest commit which does not exhibit the bug.
I have had this commit checked out and made a few fixes to eliminate compiler warnings, so I’d like for these changes (unrelated to the original bug) to eventually get included.
What I want to do at this point is make a new branch here, which will have this old commit (the last non-bugged commit) as parent.
I suspect the answer is to just commit here, using -b branchname. Is that correct?
There is no
commit -b. You shouldgit checkout -b branchname, thengit commitas usual. This will leave you with a new branch with one new commit on it, with the commit you previously checked out as its parent.