Thread (3 messages) 3 messages, 2 authors, 2016-06-15

Re: Editing the root commit

flat view

From: Chris Webb <hidden>
Date: 2016-06-15 22:54:08

Chris Webb [off-list ref] writes:
Junio C Hamano [off-list ref] writes:
quoted
Even though I wouldn't bother doing this myself, I wouldn't mind
reviewing a patch series ;-)
Okay, I'll take a look when I finish my current project!
I had a bit of spare time this morning and had a quick look through
git-rebase--interactive.sh.

Apart from the validation, message and reflog code in git-rebase.sh and
git-rebase--interactive.sh that would need fixing up to know about this
case, the essence of this seems to be starting with an orphan commit instead
of a commit descended from $onto right at the end of --interactive.

I'd love to write something like

  git checkout ${onto:---orphan}

(or a variant) but can git be persuaded to have an orphan detached HEAD like
that?

An orphan branch appears to involve HEAD containing 'ref: refs/heads/foo'
where refs/heads/foo doesn't exist yet, but I get 'not a git repo' instead
of an orphan detached HEAD with either :>.git/HEAD or rm .git/HEAD.

Cheers,

Chris.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help