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

Can git log <file> follow log of its origins?

From
MPMax Pollard <ajaxsupremo@yahoo.com>
Date
Jan 29, 2008, 17:48 UTC
Message-ID
<333479.13589.qm@web45901.mail.sp1.yahoo.com>
Hi all,
If I do the following:
     $ git init
     $ echo "The brown fox is getting old" > a.txt
     $ git add a.txt
     $ git commit -m "Commit a.txt"
     $ cp a.txt b.txt
     $ git add b.txt
     $ git commit -m "Copy a.txt to b.txt"
     $ git log b.txt

I only see the log corresponding to the 2nd commit (v1.5.3.5). Is it possible to have the above command keep going and show the history of a.txt? Or at least somehow indicate that b.txt originated from a.txt?

Thanks, MP

      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs
Next: Sean
Message 1 of 7 in “Can git log <file> follow log of its origins?”
  1. Max PollardJan 29, 2008
  2. SeanJan 29, 2008
  3. Max PollardJan 29, 2008
  4. Junio C HamanoJan 29, 2008
  5. Max PollardJan 29, 2008
  6. Junio C HamanoJan 29, 2008
  7. Max PollardJan 29, 2008

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.