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

Re: how to move with history?

From
OKOliver Kullmann <o.kullmann@swansea.ac.uk>
Date
Jun 19, 2007, 19:28 UTC
Message-ID
<20070619192834.GS3037@cs-wsok.swansea.ac.uk>
In-Reply-To
<20070618210743.GA16397@steel.home>
Thanks for all the replies!

Now I see pretty clear; a quick summary (in case somebody else wants to learn from this):

1.
"git mv file new_file" seems to be (exactly?) equivalent to

mv file new_file git rm file git add new_file

(Perhaps this information could be added to the git-mv-documentation? I would have found it useful (since I had a different expectation).)

2. To do something with the history, for example to rename "file"
to "new_file" also in the whole history, a new repository (or
a new branch) has to be created. Three possibilities:
 
 (a) Using the basic git-functionality, re-creating a repository
     by re-creating all commits (with appropriate changes) by "hand"
     or "script".
 (b) More convenient, the upcoming "git-filter-branch" apparently
     makes filtering out easier.
 (c) Or, apparently more powerful, with "cg-admin-rewritehis"
     (part of the cogito-tool) we have quite a powerful tool
     for creating a branch with a (re-created and modified)
     history (the documentation explicitely mentions how to
     remove a file from history --- that is, in the new branch).
Hope that's correct.
Thanks a lot to all!
Oliver
Previous: Alex RiesenNext: Jakub Narebski
Message 8 of 9 in “how to move with history?”
  1. Oliver KullmannJun 18, 2007
  2. Alex RiesenJun 18, 2007
  3. Oliver KullmannJun 18, 2007
  4. J. Bruce FieldsJun 18, 2007
  5. Frank LichtenheldJun 18, 2007
  6. Robin RosenbergJun 18, 2007
  7. Alex RiesenJun 18, 2007
  8. Oliver KullmannJun 19, 2007
  9. Jakub NarebskiJun 19, 2007

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.