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

Re: Sequent repos ,, pull without checkout

From
Raymond E. Pasco <ray@ameretat.dev>
Date
Sep 3, 2020, 22:25 UTC
Message-ID
<C5E34SOYIUI0.BQMTEWUI28K5@ziyou.local>
In-Reply-To
<20200903083859.Horde.d_JTRsvdjC38RffOwMv54lJ@webmail.your-server.de>

This is the expected behavior. The branches in a repository (what you see when you run "git branch" with no arguments") are different from the remote-tracking refs (what you see when you run "git branch -r", and which are updated by "git fetch"). You can't track another repository's remote-tracking refs with your remote-tracking refs, just its actual branches.

The part which may be confusing is that "git checkout", as a shortcut, lets you attempt to check out a branch that does not exist, and if a branch with the same name exists on a remote, it will create the branch and set it up to track that remote branch.

If you wanted to fetch branches from multiple other repositories, though, you would ordinarily add those repositores as remotes, rather than pushing everything through a single existing remote.

Hope that helps.
Previous: Wolfgang Graf
Message 2 of 2 in “Sequent repos ,, pull without checkout”
  1. Wolfgang GrafSep 3, 2020
  2. Raymond E. PascoSep 3, 2020

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.