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

RE: Switching branches not working in a cloned repo

From
Paul Williamson <paul.williamson@mediamiser.com>
Date
Sep 19, 2016, 20:13 UTC
Message-ID
<YQXPR01MB00235F24FF4BF39B9DDB252B9EF40@YQXPR01MB0023.CANPRD01.PROD.OUTLOOK.COM>
In-Reply-To
<CA+P7+xqR6i6eieVrEHXMNuVo6yfmRRZqX8RdVAE7y4=xSLLYyA@mail.gmail.com>
-----Original Message-----
From: Jacob Keller [mailto:jacob.keller@gmail.com] 
>Try a fresh clone with "git checkout --track origin/web_dev" and then a "git status -v" and let us know what happens. I suspect that older clones have the correct branches already setup for tracking, but the new clone >isn't doing it automatically, so when you run git checkout web_dev you're just creating a new local copy.
Hi Jake, this worked!
Your explanation seems correct - I could still list the remote branches, thanks to the command that Philip suggested, but the linkage between the two was not there by default for some reason. Very strange, I have never seen that happen before.
Anyway, this solution is sound and seems to set everything (history etc) back to how it should be.
Thanks very much for your help!
Paul
Previous: Jacob Keller
Message 5 of 5 in “Switching branches not working in a cloned repo”
  1. Paul WilliamsonSep 19, 2016
  2. Philip OakleySep 19, 2016
  3. Paul WilliamsonSep 19, 2016
  4. Jacob KellerSep 19, 2016
  5. Paul WilliamsonSep 19, 2016

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.