git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@mit.edu>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: Why is it bad to rewind a branch that has already been pushed out?
Date: Sat, 3 Feb 2007 08:20:59 -0500	[thread overview]
Message-ID: <20070203132059.GB15419@thunk.org> (raw)
In-Reply-To: <7v1wl7bv66.fsf@assigned-by-dhcp.cox.net>

On Fri, Feb 02, 2007 at 10:40:49PM -0800, Junio C Hamano wrote:
> I do not think this is a good explanation.  For example, if we
> do this:
> 
> (1) I build a series and push it out.
> 
> 	---o---o---o---j
> 
> (2) Alice clones from me, and builds two commits on top of it.
> 
> 	---o---o---o---j---a---a
> 
> (3) I rewind one and build a few, and push them out.
> 
> 	---o---o---o...j
>                     \
>                      h---h---h---h
> 
> (4) Alice pulls from me again:
> 
> 	---o---o---o---j---a---a---*
>                     \             /
>                      h---h---h---h
> 
> Contrary to the description, git will happily have Alice merge
> between the two branches, and never gets confused.
> 
> Maybe I did not want to have 'j' because it was an incomplete
> solution to some problem....

Another scenario might be if 'j' was just a bad idea, and should have
never been committed in the first place.  Now if Alice builds upon it,
and at some later point Alice asks you to pull from her repository,
'j' will appear back in your repository.  So it's better to have a
changeset which simply undoes 'j' rathern than rewind, once you've
pushed out the repository.

The one exception to this is if 'j' contains something which might be
problematic from a copyright point of view, in which case you're
largely screwed if other people such as Alice has already pulled from
you and started basing changes on 'j'.

							- Ted

  parent reply	other threads:[~2007-02-03 13:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-03  6:40 Why is it bad to rewind a branch that has already been pushed out? 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 [this message]
2007-02-04 16:16 ` Robin Rosenberg
2007-02-04 20:08   ` Junio C Hamano
     [not found]     ` <20070205132150.123659@dial-up-mi-449.lombardiacom.it>
2007-02-05 13:27       ` [PATCH] Documentation: add KMail in SubmittingPatches Michael
2007-02-06  3:07         ` Junio C Hamano
2007-02-06 13:45           ` Michael
2007-02-06 14:16             ` Jakub Narebski
2007-02-06 14:47           ` Andy Parkins
  -- strict thread matches above, loose matches on Subject: below --
2007-02-03  8:42 Why is it bad to rewind a branch that has already been pushed out? linux
2007-02-03  9:04 ` 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=20070203132059.GB15419@thunk.org \
    --to=tytso@mit.edu \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).