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

Re: [RFC] rebase: use @{upstream} if no upstream specified

From
Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Date
Nov 15, 2010, 23:06 UTC
Message-ID
<AANLkTi=sEVHTqWqcdztcEv6kTZgscVYZWr-N0SBMRwvc@mail.gmail.com>
In-Reply-To
<EDBF4929-2ECF-4CDD-9F0B-0EE3B6BA68A7@sb.org>
On Mon, Nov 15, 2010 at 5:48 PM, Kevin Ballard <kevin@sb.org> wrote:
Show 14 quoted lines
> On Nov 12, 2010, at 12:55 PM, Martin von Zweigbergk wrote:
>
>> With 'git pull --rebase', the user can configure the upstream repository
>> to fetch from and reference to rebase against if none is specified on
>> the command line.
>>
>> However, if, instead of 'git pull --rebase', the user were to do 'git
>> fetch' followed by 'git rebase', the upstream branch would need to be
>> specified on the command line. This patch teaches 'git rebase' to
>> default to the same configured upstream ref as 'git pull --rebase'
>> uses.
>
> What happens if one were to do `git fetch origin some_other_branch`
> followed by `git rebase`?

Good question. What would happen with my patch is that you would rebase against your configured uptream.

The requirement to provide the upstream for 'git rebase', but not for 'git pull' was my inspiration, but maybe I should not mention that it the commit message. So maybe my motivation is flawed, but ignoring that, do you think it is sensible to default to '@{upstream}'?

Previous: Kevin BallardNext: Jay Soffian
Message 9 of 11 in “[RFC] rebase: use @{upstream} if no upstream specified”
  1. Martin von ZweigbergkNov 12, 2010
  2. Yann DirsonNov 13, 2010
  3. Martin von ZweigbergkNov 17, 2010
  4. Jeff KingNov 19, 2010
  5. Martin von ZweigbergkNov 20, 2010
  6. Jeff KingNov 20, 2010
  7. Martin von ZweigbergkNov 20, 2010
  8. Kevin BallardNov 15, 2010
  9. Martin von ZweigbergkNov 15, 2010
  10. Jay SoffianNov 15, 2010
  11. Kevin BallardNov 15, 2010

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.