* I want delete fault commit from my git repository
@ 2008-07-14 9:24 chongyc
2008-07-14 16:41 ` Jakub Narebski
0 siblings, 1 reply; 2+ messages in thread
From: chongyc @ 2008-07-14 9:24 UTC (permalink / raw)
To: git
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 ?
please help me.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: I want delete fault commit from my git repository
2008-07-14 9:24 I want delete fault commit from my git repository chongyc
@ 2008-07-14 16:41 ` Jakub Narebski
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Narebski @ 2008-07-14 16:41 UTC (permalink / raw)
To: chongyc; +Cc: git
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-14 16:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-14 9:24 I want delete fault commit from my git repository chongyc
2008-07-14 16:41 ` Jakub Narebski
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).