From: Matthieu Moy <Matthieu.Moy@imag.fr>
To: git@vger.kernel.org
Subject: Re: Repo cleanup problem
Date: Fri, 11 May 2007 10:10:43 +0200 [thread overview]
Message-ID: <vpqveezhjb0.fsf@bauges.imag.fr> (raw)
In-Reply-To: <9909dee80705110103h5b848490m296c001beecfa1f1@mail.gmail.com> (Eugine Kosenko's message of "Fri\, 11 May 2007 11\:03\:32 +0300")
"Eugine Kosenko" <eugine.kosenko@gmail.com> writes:
> For now I'm looking for a way to remove the garbage commit.
Branch before the garbage commit. Then, you can use git-rebase to
replay the correct history on top of your new branch. Note that
git-rebase will break merging if you already used merge: it does not
"move" your old commits to your new branch, it instead creates new
commits with the same changes at the old ones, in the new branch.
That's probably what you've done already.
Then, to have git-gc remove the old, bad, history, you need to remove
any reference you have to it: branches and tags. git-branch -d and
perhaps git-tag -d will tell you.
See also git-fsck that can point you to dangling objects, which should
then be removed by git-gc.
gitk --all, on the other hand, will show you the commits to which you
have a reference (and their ancestry).
--
Matthieu
next prev parent reply other threads:[~2007-05-11 8:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-11 8:03 Repo cleanup problem Eugine Kosenko
2007-05-11 8:10 ` Matthieu Moy [this message]
2007-05-11 8:19 ` Karl Hasselström
2007-05-11 9:32 ` Eugine Kosenko
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=vpqveezhjb0.fsf@bauges.imag.fr \
--to=matthieu.moy@imag.fr \
--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).