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

Confused about push/pull of a branch

From
FAFritz Anderson <fritza@uchicago.edu>
Date
Aug 25, 2009, 17:40 UTC
Message-ID
<BA2E0DDB-3DE0-4D49-BFA6-72CFEDEBA5AE@uchicago.edu>

I can't get a second machine to pull in a branch that's in my remote repository. I'm confused.

The remote is a bare repository on machine_1.
In my working copy on machine_1:
machine_1$ git branch
   master
   search-controller
   use-tiles
* webservices
# The following should not be necessary, as gitk already
# identifies a remotes/origin/webservices, but just to be sporting:
machine_1$ git push origin webservices
Everything up-to-date

Branch webservices was created after the working copy on machine_2 was cloned.

In my working copy on machine_2:
machine_2$ git pull
Password:
# Progress messages, no protests.
machine_2$ git checkout webservices
error: pathspec 'webservices' did not match any file(s) known to git.
machine_2$ git branch
* master
machine_2$

git-config shows the two repository URLs are identical, net of machine_2 having to specify a user name and host. The machine_2 .git/ config shows a section for [branch "master"], but not for webservices. Is that the problem? What's the approved way of adding [branch "webservices"], and what do I put into it?

I've obviously forgotten something. Or never understood something (there's a lot in Git not to understand). How do I get the webservices branch onto machine_2, so I can check it out?

	— F
Next: Fritz Anderson
Message 1 of 5 in “Confused about push/pull of a branch”
  1. Fritz AndersonAug 25, 2009
  2. Fritz AndersonAug 25, 2009
  3. Fritz AndersonAug 25, 2009
  4. Jeff KingAug 25, 2009
  5. Jeff KingAug 25, 2009

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.