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

Re: bug report: git push fails in worktree

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 6, 2022, 01:42 UTC
Message-ID
<xmqqr0xdnw88.fsf@gitster.g>
In-Reply-To
<COUBW3AG192J.1UCDLVUZ38VJA@tempest>
"tionis" <out@tionis.dev> writes:
Show 9 quoted lines
> Thank you for filling out a Git bug report!
> Please answer the following questions to help us understand your issue.
>
> What did you do before the bug happened? (Steps to reproduce your issue)
> Setup two branches.  
> Check the main one out in a repo.  
> Checkout the second one using a worktree with
> ...
> Execute git push

There must be some steps missing still in the above description. You seem to be expecting "git push" to push things out to somewhere, but in the above sequence (I am assuming that you started with "git init" to create a local repository), there is nothing I see that tells "git push" where to push to. There must have been some step not described above that sets configuration to tell where to push what when "git push" is run without "where to" and "what" on the command line.

Well, I am assuming too much. Your "Execute git push" may not mean "type g i t SPACE p u s h RETURN and do nothing else" (it may mean "run 'git push https://github.com/tionis/sample <RETURN>'", for example, and readers cannot tell).

If you didn't use an extra worktree, but otherwise do the same thing, does "git" push out what you expect it to?

Previous: tionisNext: tionis
Message 2 of 3 in “bug report: git push fails in worktree”
  1. tionisDec 6, 2022
  2. Junio C HamanoDec 6, 2022
  3. tionisDec 6, 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.