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

Re: Git re-creates newly added directory when it is pushed

From
Philip Oakley <philipoakley@iee.email>
Date
Aug 30, 2021, 09:27 UTC
Message-ID
<677bef35-4d27-748a-1508-2e65707317ee@iee.email>
In-Reply-To
<xmqqk0k37p1t.fsf@gitster.g>
On 30/08/2021 01:29, Junio C Hamano wrote:
Show 23 quoted lines
> Yuri <yuri@rawbw.com> writes:
>
>> On 8/29/21 5:07 PM, Junio C Hamano wrote:
>>> This is one of the reasons why "rebase" (especially "rebase -i") may
>>> want to insist starting at the top-level of the working tree, like
>>> "git bisect" does.  Because running the command from a subdirectory
>>> works most of the time until it doesn't, people tend to complain why
>>> they should go up to the top-level before they can run the command.
>>>
>>> And this is why---it causes end-user confusion.
>>
>> But there's no confusion here - git doesn't have to delete the
>> directory and recreate it, but it does it anyway.
>>
>> So this is just a bug that git disturbs users more than it should.
> No, this is an example that users usually can be unaware of the
> reason why it is a bad idea to start from subdirectories.
>
> As Elijah explained, if a multi-step rebase had to stop and ask help
> from the user to resolve conflict _before_ the step that creates the
> user's current directory, it would leave the user in a confusing
> situation where the user thinks is in a directory but that directory
> does not yet exist in the filesystem.
Does this end up being a documentation issue?

e.g. Users should start at top-level because.. or Note, if the current directory is removed at some step during the rebase then..

Often folk do read the documentation as a lest resort..
-- 
Philip
Previous: Junio C HamanoNext: Elijah Newren
Message 7 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.