git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: "Gennady Kushnir" <genkush@rujel.net>
Cc: "Michael J Gruber" <michaeljgruber+gmane@fastmail.fm>,
	git@vger.kernel.org
Subject: Re: Removing some files from history
Date: Fri, 17 Oct 2008 05:20:21 -0700 (PDT)	[thread overview]
Message-ID: <m34p3bjtx4.fsf@localhost.localdomain> (raw)
In-Reply-To: <96ed5eac0810170451y69fd864jb44ef62bca468498@mail.gmail.com>

Please do not toppost, and quote only fragments you are replying to.

"Gennady Kushnir" <genkush@rujel.net> writes:

> thank you for precise instructions.
> 
> however I did not completely understand the part about references
> and reflog what are these? git tags?

git-filter-branch saves old version under refs/original/* namespace.
You have to remove them after making sure that your rewritten history
is correct.  

Additionally git keeps log where branch (tip/head of branch) was in
your repository; this is kind of generalization of ORIG_HEAD, and
allows to recover from such mistakes as wrong "git reset --hard".
Reflog entries from your original history also would pin commits, so
you have to expire reflog.

And finally the commits you have are there in repository, so you have
to "prune" repository to get rid of them.  Reflog entries and
refs/original/* pin those commits, so you have to remove them prior to
pruning.  Pruning simply removes objects which are unreferenced.

> and another question:
> did I understand it right, that I can even make some changes to that
> file in history - not just simply delete one?

Yes, see man git-filter-branch.

-- 
Jakub Narebski
Poland
ShadeHawk on #git

      reply	other threads:[~2008-10-17 12:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-17 10:38 Removing some files from history Gennady Kushnir
2008-10-17 10:42 ` Jeff King
2008-10-17 10:52 ` Michael J Gruber
2008-10-17 11:51   ` Gennady Kushnir
2008-10-17 12:20     ` 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=m34p3bjtx4.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=genkush@rujel.net \
    --cc=git@vger.kernel.org \
    --cc=michaeljgruber+gmane@fastmail.fm \
    /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).