Thread (5 messages) flat view 5 messages, 4 authors, 2016-06-15

Re: Removing some files from history

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:45:29

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

"Gennady Kushnir" [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help