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

'git log' doesn't keep log of un-removed and then renamed directory

From
YYuri <yuri@freebsd.org>
Date
Aug 14, 2021, 09:09 UTC
Message-ID
<75911f47-1433-f0a4-7d46-f1fb2fd44cf4@rawbw.com>

In the FreeBSD ports tree I restored the previously removed directory math/dynare:

1. git checkout 3fb72e318f7be~1 -- math/dynare
2. git mv math/dynare science/dynare
3. rm -rf science/dynare && cp -r science/dynare.new science/dynare
4. git add science/dynare
5. git commit science/dynare

After this 'git log science/dynare' only shows my last commit, and not the previous history of 'math/dynare' that existed before its removal.

The above sequence of commands should have kept and migrated the history of math/dynare to science/dynare, but it didn't.

The corresponding subversion command sequence keeps history.
Yuri
Next: Chris Torek
Message 1 of 3 in “'git log' doesn't keep log of un-removed and then renamed directory”
  1. YuriAug 14, 2021
  2. Chris TorekAug 14, 2021
  3. Chris TorekAug 14, 2021

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.