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

git a/xyz or b/xyz

From
FCFabrice Creuzot <code@luigifab.fr>
Date
Jun 18, 2022, 10:45 UTC
Message-ID
<b4f40821-8592-1a35-8b60-219fd7e29e9f@luigifab.fr>
Hello

When we are reading a "git diff", all paths are prefixed with "a/" and "b/". Example:

diff --git a/xyz
index 4aa4b5230..1c2b8b69e 100644
--- a/xyz
+++ b/xyz
@@ -1,7 +1,7 @@


With my terminal, I double click on the path to select the full path for 
copy.

Then, when I paste: "git log a/xyz",
  git says: unknown revision or path not in the working tree

Ok, I need to remove the "a/" or "b/".
But, is git can understand that "a/xyz" is "xyz" because "a/xyz" does 
not exist?

Thanks
Next: Shaoxuan Yuan
Message 1 of 5 in “git a/xyz or b/xyz”
  1. Fabrice CreuzotJun 18, 2022
  2. Shaoxuan YuanJun 18, 2022
  3. Shaoxuan YuanJun 18, 2022
  4. Konstantin KhomoutovJun 20, 2022
  5. Fabrice CreuzotJun 24, 2022

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.