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

Git re-creates newly added directory when it is pushed

From
YYuri <yuri@rawbw.com>
Date
Aug 28, 2021, 03:46 UTC
Message-ID
<c0557284-8f82-76cc-8c47-0b1bc9f2ce5a@rawbw.com>
I create a new directory, add it to git and push it.

After push it says: Unable to read current working directory: No such file or directory

[yuri@yv /usr/ports/math/stanmath]$ git pull -r && git push origin 
--push-option=confirm-author
remote: Enumerating objects: 283, done.
remote: Counting objects: 100% (283/283), done.
remote: Compressing objects: 100% (187/187), done.
remote: Total 188 (delta 94), reused 3 (delta 0), pack-reused 0
Receiving objects: 100% (188/188), 29.37 KiB | 578.00 KiB/s, done.
Resolving deltas: 100% (94/94), completed with 50 local objects.
 From ssh://gitrepo.freebsd.org/ports
    80469139f77f..cf8b94761057  main       -> origin/main
Successfully rebased and updated refs/heads/main.
fatal: Unable to read current working directory: No such file or directory

Why does Git have to delete and then create again the directory when it is already there?

This isn't a big issue, but it is very odd that git deletes the working directory.

FreeBSD 13.
Yuri
Next: Elijah Newren
Message 1 of 9 in “Git re-creates newly added directory when it is pushed”
  1. YuriAug 28, 2021
  2. Elijah NewrenAug 28, 2021
  3. YuriAug 28, 2021
  4. Junio C HamanoAug 30, 2021
  5. YuriAug 30, 2021
  6. Junio C HamanoAug 30, 2021
  7. Philip OakleyAug 30, 2021
  8. Elijah NewrenAug 31, 2021
  9. Junio C HamanoAug 31, 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.