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

Re: Git workflow with upstream repository

From
Avery Pennarun <apenwarr@gmail.com>
Date
Jul 24, 2010, 02:39 UTC
Message-ID
<AANLkTi=dgjoa8c=UN1VvMDgo_RAptTr1YFk+n_7M9sdM@mail.gmail.com>
In-Reply-To
<AANLkTi=82NDSfizCCjoJ-Sj05DzwXfa35ro60MiWSQdz@mail.gmail.com>

On Fri, Jul 23, 2010 at 9:43 PM, Bradley Wagner <bradley.wagner@hannonhill.com> wrote:

Show 5 quoted lines
> Thanks, I'll check those out! So, I take it there is not a way to get
> a simple message like what git status tells you when you're local
> branch is behind the remote branch:
>
> "Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded."

As far as I know, any given branch can only "track" one particular branch, and that message is only generated relative to the branch you're tracking. You can adjust which one you're tracking by editing .git/config.

> Is there even a concept of a fast-forward merge when pulling from a
> remote repo that is not the remote to which your branches are
> tracking?

Yes. Tracking branches are really just a notational convenience. In fact, they don't do very much more than generating the above message. (The other thing they do is make 'git pull' do something by default when you don't give it any other parameters.)

You might enjoy this article: http://eagain.net/articles/git-for-computer-scientists/

> Is it possible to rebase based on a branch that is *not* the branch
> you're currently tracking? Is that what the --onto flag is for?

Yes, it's possible. The question of when you do or don't need the --onto option is a little more complex than that, but yes, that's what's it's for, more or less.

Have fun,
Avery
Previous: Bradley Wagner
Message 4 of 4 in “Git workflow with upstream repository”
  1. Bradley WagnerJul 24, 2010
  2. Avery PennarunJul 24, 2010
  3. Bradley WagnerJul 24, 2010
  4. Avery PennarunJul 24, 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.