From: Jeff King <peff@peff.net>
To: Gergely Buday <gbuday@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: removing a commit from a branch
Date: Wed, 4 May 2011 04:45:02 -0400 [thread overview]
Message-ID: <20110504084502.GC8512@sigill.intra.peff.net> (raw)
In-Reply-To: <BANLkTimtpvVRU=1iCbrteyHixaWGuVKDjQ@mail.gmail.com>
On Wed, May 04, 2011 at 10:35:08AM +0200, Gergely Buday wrote:
> I have a problematic commit in a series of commits on a branch. It
> contains adding a large binary file, which I would like to avoid to
> push to our main repository. How can I remove that from the series of
> commits? A command-line solution, please, if possible.
Removing it will involve rewriting history, which can create headaches
for people who have built on that history (they will need to rebase
their commits on the rewritten history). But if that's OK, then the
command you want is filter-branch. See "git help filter-branch"; in
particular, the EXAMPLES section contains commands to do exactly what
you want.
-Peff
next prev parent reply other threads:[~2011-05-04 8:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-04 8:35 removing a commit from a branch Gergely Buday
2011-05-04 8:45 ` Jeff King [this message]
2011-05-04 8:55 ` Gergely Buday
2011-05-04 9:17 ` Peter Krefting
2011-05-04 17:53 ` Dirk Süsserott
2011-05-04 19:12 ` Sorry, completely off-topic. I've a mailer problem (was: Re: removing a commit from a branch) Dirk Süsserott
2011-05-04 21:28 ` Øyvind A. Holm
[not found] ` <4DC1B103.90007@cisco.com>
2011-05-05 18:59 ` Sorry, completely off-topic. I've a mailer problem Dirk Süsserott
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=20110504084502.GC8512@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=gbuday@gmail.com \
--cc=git@vger.kernel.org \
/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).