Re: Difficulties in advertising a new branch to git newbies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 30, 2007 at 05:34:07PM -0800, Junio C Hamano wrote:

> That does not protect anything other than interactive "git
> commit".  People often do "git commit -m" or "git commit -C".

Yes, those should be covered by a message.

> In addition, rebasing a detached HEAD, merging into a detached
> HEAD, cherry-picking onto a detached HEAD or running reset on a

I'm not even sure what it means to rebase a detached HEAD. Merging
and cherry picking should make a similar warning.

> detached HEAD to move to a particular state you want to look at

Running reset on a detached HEAD isn't a problem unless you've done one
of the other things.

> I do not think warning at every step that you are "in a funny
> state" does not help productivity, so I'd prefer warning upfront
> once and be silent afterwards, until you try to come back with
> "git checkout <existing branch>", potentially losing your state,
> which is what we currently do.

I didn't quite parse your first sentence, but I think I get the general
meaning. I just think it is awkward to have to either see such a warning
(or use -f) just to _look_ at detached commits, when you aren't doing
anything even remotely dangerous. The dangerous thing is _creating_
commits on top of a detached head.  I honestly don't think it should be
allowed at all, but since some people have argued that it is useful,
that seems like the place to put warnings. Anything else is just making
things more confusing for the sorts of people Carl is dealing with --
those who merely want to look around.

> For situations like Carl's intstruction where a user, who is
> purely a sightseer, uses the detached HEAD to go-and-look a
> particular state, the fact that "-f" loses the previous local

Yes, though it would be nicer not to have to explain to them why '-f' is
needed.

-Peff
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]