Re: Git workflow with upstream repository
- From
Bradley Wagner <bradley.wagner@hannonhill.com>
- Date
- Jul 24, 2010, 01:43 UTC
- Message-ID
- <AANLkTi=82NDSfizCCjoJ-Sj05DzwXfa35ro60MiWSQdz@mail.gmail.com>
- In-Reply-To
- <AANLkTik5U0oh8p42hK-871iwnTA5a66Yj-8pU4xSZS40@mail.gmail.com>
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."
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?
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?
- Bradley
On Jul 23, 2010, at 9:24 PM, Avery Pennarun <apenwarr@gmail.com> wrot
Show 29 quoted lines
> On Fri, Jul 23, 2010 at 8:58 PM, Bradley Wagner > <bradley.wagner@hannonhill.com> wrote: >> 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