From: Jakub Narebski <jnareb@gmail•com>
To: chongyc <chongyc27@gmail•com>
Cc: git@vger•kernel.org
Subject: Re: I want delete fault commit from my git repository
Date: Mon, 14 Jul 2008 09:41:26 -0700 (PDT) [thread overview]
Message-ID: <m3wsjos9jm.fsf@localhost.localdomain> (raw)
In-Reply-To: <9f01c190-73b6-48b1-88d9-ed67d0945d81@k13g2000hse.googlegroups.com>
chongyc <chongyc27@gmail•com> writes:
> I have found buggy commit object which I had committed into git
> repository wrongly
>
> So I am going to delete it from my git repository
>
> How to do it ?
If it is just created commit (and not yet published), use
"git commit --amend" to correct it, or "git reset --hard HEAD^"
to just drop it.
If you have published history (somebody is relying on history
containing broken commit) the only way is to add commit reverting
changes brought by broken commit using git-revert.
If you can rewrite history, use "git rebase --interactive" and simply
remove the commit from instructions/series file if the commit you want
to remove is not too deep in history, or use git-filter-branch if
broken commit is somewhere deeper. See documentation for details.
--
Jakub Narebski
Poland
ShadeHawk on #git
prev parent reply other threads:[~2008-07-14 16:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-14 9:24 I want delete fault commit from my git repository chongyc
2008-07-14 16:41 ` Jakub Narebski [this message]
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=m3wsjos9jm.fsf@localhost.localdomain \
--to=jnareb@gmail$(echo .)com \
--cc=chongyc27@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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