Help with Git remotes
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Help with Git remotes

  1. #1
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,233

    Help with Git remotes

    Our project uses an open source library called Glib. We need to customize it slightly - so I followed these instructions for setting up our Git repository. Basically, I checked out Glib (from its own Git repo) to my local hard drive. I then renamed that remote from "origin" to "upstream". I then created a new remote called "origin" which is our own repo at GitHub.

    Up to now, everything has worked really well. I can pull in changes from the official Glib repo (i.e. "upstream"), apply any customizations (if needed), then push everything to "origin" (i.e. to our GitHub repo). From there, our other devs can pull their own working copies. It works brilliantly - except.....

    For some reason, I never see any newly added branches (in the upstream repo). For example, one got created yesterday, called "glib-2-38". Using TortoiseGit I can create a completely new (local) Glib repo - and that DOES contain the latest branch. But my usual working copy stubbornly displays only the branches that were present when I first created it.

    Can anyone explain what's going on here? TortoiseGit is mostly a shell app for Windows Explorer but it can also be driven from the command line. So if there's a Git command I could issue to make it find the latest branches, that should be possible.
    "A problem well stated is a problem half solved. - Charles F. Kettering

  2. #2
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,233

    Re: Help with Git remotes

    Replying to my own post...

    In case anyone else needs to know how to do this, you can issue this command from a command prompt:-

    git remote update
    which forces your local copy to check (all) its remotes for newly added branches.
    "A problem well stated is a problem half solved. - Charles F. Kettering

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center