Re: removing a commit from a branch

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

 



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
--
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]