Git development
 help / color / mirror / Atom feed
* RFC: git rebase -i and root commits
@ 2008-07-23  1:58 Eric Raible
  2008-07-23  2:02 ` Stephan Beyer
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Raible @ 2008-07-23  1:58 UTC (permalink / raw)
  To: git

My normal workflow is to create a .gitignore in my initial commit.

When I later realize that I've forgotten something from that file
I could of course just commit the changes, but I'd rather use "git rebase -i"
in the normal way to make myself appear smarter than I am.
Especially since this realization usually comes early on
(and certainly before publishing).

But rebase can't go all the way to a root ("fatal: Needed a single revision").
The best I've found is:

1) git checkout -b temp <root commit>
2) echo '*.tmp' >> .gitignore
3) git commit --amend .gitignore
4) git rebase --onto temp <root commit> master

If there really is an asymmetry here and I haven't missed anything
(a large assumption), then what's the best way to think about it?

Is there a role for a default commit (e.g. the sha1 of "") here so that
'rebase -i' can update all commits and not just the ones with parents?

Or should I just get used to it and move on?

Thanks - Eric

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: RFC: git rebase -i and root commits
  2008-07-23  1:58 RFC: git rebase -i and root commits Eric Raible
@ 2008-07-23  2:02 ` Stephan Beyer
  2008-07-23  9:05   ` Johannes Schindelin
  0 siblings, 1 reply; 3+ messages in thread
From: Stephan Beyer @ 2008-07-23  2:02 UTC (permalink / raw)
  To: Eric Raible; +Cc: git

Hi,

Eric Raible wrote:
> My normal workflow is to create a .gitignore in my initial commit.
> 
> When I later realize that I've forgotten something from that file
> I could of course just commit the changes, but I'd rather use "git rebase -i"
> in the normal way to make myself appear smarter than I am.
> Especially since this realization usually comes early on
> (and certainly before publishing).
> 
> But rebase can't go all the way to a root ("fatal: Needed a single revision").

I think this has been fixed recently.

Regards,
  Stephan

-- 
Stephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: RFC: git rebase -i and root commits
  2008-07-23  2:02 ` Stephan Beyer
@ 2008-07-23  9:05   ` Johannes Schindelin
  0 siblings, 0 replies; 3+ messages in thread
From: Johannes Schindelin @ 2008-07-23  9:05 UTC (permalink / raw)
  To: Stephan Beyer; +Cc: Eric Raible, git

Hi,

On Wed, 23 Jul 2008, Stephan Beyer wrote:

> Eric Raible wrote:
> > My normal workflow is to create a .gitignore in my initial commit.
> > 
> > When I later realize that I've forgotten something from that file
> > I could of course just commit the changes, but I'd rather use "git rebase -i"
> > in the normal way to make myself appear smarter than I am.
> > Especially since this realization usually comes early on
> > (and certainly before publishing).
> > 
> > But rebase can't go all the way to a root ("fatal: Needed a single revision").
> 
> I think this has been fixed recently.

No, it has not.

What has been fixed is that you can cherry-pick a root commit now, not 
rebase onto nothing.

While I am somewhat sympathetic with Eric's use case, I am not sure that 
we should support it with rebase -i.

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-07-23  9:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-23  1:58 RFC: git rebase -i and root commits Eric Raible
2008-07-23  2:02 ` Stephan Beyer
2008-07-23  9:05   ` Johannes Schindelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox