[GTALUG] git questions

Tim Tisdall tisdall at gmail.com
Fri Mar 6 17:21:15 UTC 2015


On Fri, Mar 6, 2015 at 10:29 AM, Giles Orr <gilesorr at gmail.com> wrote:
> "git status" usually says "Your branch is up-to-date with
> 'origin/master'" (or "ahead"), but occasionally - even though origin
> is configured properly - this line doesn't appear.  Is there a way to
> convince it to always show this line?
>
> Unfortunately, "git status" doesn't seem to ever notice if you're
> "behind" origin, thus the need for "git remote show origin".  Any fix
> for that?

`git status` only looks at what's on your local file system.  You need
to first do a `git fetch` to update your local information (doesn't
change your code, just git's information), then `git status` will
reflect what's actually happening.  Without some command that fetches
things from the remote, `git status` will always say you're up-to-date
(or ahead if you've committed things).


More information about the talk mailing list