git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Confused about git filter-branch results

From
MKMike Kelly <mike@piratehaven.org>
Date
Jan 26, 2011, 11:18 UTC
Message-ID
<20110126111835.GA1765@skull.piratehaven.org>
In-Reply-To
<201101251732.40811.trast@student.ethz.ch>
On Tue, Jan 25, 2011 at 05:32:40PM +0100, Thomas Rast wrote:
> Before you read the explanations below, I recommend that you open
> 'gitk --all' and use it to see whether I'm right.
> 
This was really useful for finding my problem.
> Most likely you filtered all commits on your branch, but not master,
> so master now points to an entirely disjoint set of commits.
> 

Almost exactly correct. The tree branched off at a really early point in development.

Show 5 quoted lines
> Assuming my "disjoint history" theory is correct, you should either
> discard your rewrite along the lines of
> 
>   git branch -f foo refs/original/refs/heads/foo
> 
Done.  This cleaned up the mess.
> Confused yet? :-)
> 

Not at all, I found your explanation to be clear and straight forward. Thank you.

At first I was grumbling to myself about git filter-branch rewriting every commit, but then I remembered that there were a few messages on stderr complaining that some commits were not in the correct encoding. I guess that the tool decided to rewrite these commits for me (without asking), thus causing a fork. Sorry for not mentioning these error messages before, I forgot about them in the ensuing panic.

I just want to give a shout-out to all the git developers, I've used RCS, CVS, and SVN in the past, and they all had different ways of making life miserable. Git is the first tool which I felt was working with me, not against me. Keep up the good work!

Anyway, I'm back in business and have by branch under control again.
Thanks again,

Mike (:

-- 
--------Mike@PirateHaven.org-----------------------The_glass_is_too_big--------
Previous: Thomas Rast
Message 3 of 3 in “Confused about git filter-branch results”
  1. Mike KellyJan 25, 2011
  2. Thomas RastJan 25, 2011
  3. Mike KellyJan 26, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.