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, 01:24 UTC
Message-ID
<AANLkTik5U0oh8p42hK-871iwnTA5a66Yj-8pU4xSZS40@mail.gmail.com>
In-Reply-To
<AANLkTinyUGLMTQ=ruk69pptDUQ3VyaQ7CwtO+QfeJUVC@mail.gmail.com>

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

Show 5 quoted lines
> If I'm working with another remote repository 'upstream' that I
> perhaps don't have permissions to and then my branches are not
> tracking against, how would I do something similar to be able to first
> see how my branch compares to the remote and then either rebase or
> pull/merge.

# show the commits in my local branch that aren't in upstream git log upstream/master..

# show the commits in upstream that aren't in my local branch git log ..upstream/master

# a cuter way to show the commits in upstream that aren't in my local branch git shortlog ..upstream/master

# summarize the differences in upstream since we diverged (not including my own changes) git diff --stat upstream/master..

# summarize the differences between my branch and upstream (including my changes and theirs) # (note: three dots) git diff --stat ...upstream/master

Have fun,
Avery
Previous: Bradley WagnerNext: Bradley Wagner
Message 2 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.