Re: Difficulties in advertising a new branch to git newbies

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Junio C Hamano
Date: Tuesday, January 30, 2007 - 6:34 pm

Jeff King <peff@peff.net> writes:


That does not protect anything other than interactive "git
commit".  People often do "git commit -m" or "git commit -C".
In addition, rebasing a detached HEAD, merging into a detached
HEAD, cherry-picking onto a detached HEAD or running reset on a
detached HEAD to move to a particular state you want to look at
are all useful and valid operations, and you wouldn't get any
warning when you do so.

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.

Having said that, I think making "git checkout -f" not to issue
the warning might be enough.  Actually, I would even say it
would make perfect sense.

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
modifications is not an issue at all.  On the other hand, if the
user is a developer who uses git, the warning upfront (if we
want to keep it for educational purposes, to make people aware
of what is happening) is useful without "-f", and when a user
who is using git to manage his own development, he hopefully
knows what "git checkout -f" means to his local modifications
already.

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Difficulties in advertising a new branch to git newbies, Matthias Lederhofer, (Tue Jan 30, 3:33 pm)
Re: Difficulties in advertising a new branch to git newbies, Matthias Lederhofer, (Tue Jan 30, 3:36 pm)
Re: Difficulties in advertising a new branch to git newbies, Daniel Barkalow, (Tue Jan 30, 5:10 pm)
Re: Difficulties in advertising a new branch to git newbies, Junio C Hamano, (Tue Jan 30, 6:34 pm)
Re: Difficulties in advertising a new branch to git newbies, Daniel Barkalow, (Tue Jan 30, 10:09 pm)
Re: Difficulties in advertising a new branch to git newbies, Guilhem Bonnefille, (Wed Jan 31, 6:13 am)
Re: Difficulties in advertising a new branch to git newbies, J. Bruce Fields, (Wed Jan 31, 7:38 am)
Re: Difficulties in advertising a new branch to git newbies, Johannes Schindelin, (Wed Jan 31, 9:15 am)
Re: Difficulties in advertising a new branch to git newbies, Daniel Barkalow, (Wed Jan 31, 9:25 am)
Re: Difficulties in advertising a new branch to git newbies, Josef Weidendorfer, (Wed Jan 31, 5:20 pm)