From: linux@horizon.com
To: git@vger.kernel.org, junkio@cox.net
Subject: Re: Why is it bad to rewind a branch that has already been pushed out?
Date: 3 Feb 2007 03:42:47 -0500 [thread overview]
Message-ID: <20070203084247.13894.qmail@science.horizon.com> (raw)
You're quite right that git's basic history model won't get
confused, just the users might be.
The basic problem is that, if you rewind your series from j to j^,
and Alice has already fetched it, she'll get an error when she tries to
fetch it again and git notices that j -> h is not a fast-forward.
It's not the error per se that's the problem, but the potentially
confusing condition that git fetch justifiably refuses to let you
get into without explicit authorization.
Heck, it could be a security breach, which is the main reason that
it's an error and not a warning.
It won't confuse git, but might confuse Alice.
How about:
Be careful with that last command: in addition to losing any changes
in the working directory, it will also remove all later commits from
this branch. If this branch is the only branch containing those
-commits, they will be lost. (Also, don't use "git reset" on a
-publicly-visible branch that other developers pull from, as git will
-be confused by history that disappears in this way.)
+commits, they will be lost. Also, avoid using "git reset" on a
+publicly-visible branch that other developers have pulled from,
+because git (deliberately) has no way to "pull back" the commits
+they've already seen. Git can cope with the resultant mess, but
+it can be confusing.
next reply other threads:[~2007-02-03 8:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-03 8:42 linux [this message]
2007-02-03 9:04 ` Why is it bad to rewind a branch that has already been pushed out? Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2007-02-03 6:40 Junio C Hamano
2007-02-03 10:40 ` Andy Parkins
2007-02-03 19:42 ` Junio C Hamano
2007-02-04 18:01 ` Andy Parkins
2007-02-03 13:20 ` Theodore Tso
2007-02-04 16:16 ` Robin Rosenberg
2007-02-04 20:08 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070203084247.13894.qmail@science.horizon.com \
--to=linux@horizon.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.