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

Re: Git rebase no longer defaults to upstream after force push

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Apr 19, 2023, 00:06 UTC
Message-ID
<643f30851cd53_2217c42948e@chronos.notmuch>
In-Reply-To
<CA+JQ7M_KuDXBaVTzVwLTx+R4-6-3TOuUOpcchkS26iiosc85Hg@mail.gmail.com>
Erik Cervin Edin wrote:
Show 11 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)
> 
>   git init --bare foo.git && git clone foo.git/ foo && cd foo
>   touch bar && git add bar && git commit -m init
>   git push -u
>   git switch -c a
>   seq 1 3 > bar && git add bar && git commit -m 1
>   git push
For me it fails at this point.
  fatal: The upstream branch of your current branch does not match
  the name of your current branch.  To push to the upstream branch
  on the remote, use
      git push . HEAD:master
  To push to the branch of the same name on the remote, use
      git push . HEAD
  To choose either option permanently, see push.default in 'git help config'.
  To avoid automatically configuring an upstream branch when its name
  won't match the local branch, see option 'simple' of branch.autoSetupMerge
  in 'git help config'.
What's your configured push.default?
>   seq 11 13 > bar && git add bar && git commit -m 2
>   git rebase -ir # Works like git rebase -ir @{upstream}
>   git push --force origin main:a
>   git rebase -ir # No longer works like git rebase -ir @{upstream}
This works fine here.
-- 
Felipe Contreras
Previous: Sergey Organov
Message 6 of 6 in “Git rebase no longer defaults to upstream after force push”
  1. Erik Cervin EdinApr 18, 2023
  2. Phillip WoodApr 18, 2023
  3. Cem GündoğduApr 18, 2023
  4. Erik Cervin EdinApr 19, 2023
  5. Sergey OrganovApr 19, 2023
  6. Felipe ContrerasApr 19, 2023

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.