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

fetch for bare repository

From
DADmitry A. Ashkadov <dmitry.ashkadov@gmail.com>
Date
Jan 13, 2012, 10:42 UTC
Message-ID
<4F100A7B.3030001@gmail.com>
Hello!

I can't understand how to fetch branches from external repository for bare repository.

For example, imagine 2 git repositories: "B" and "C". "B" repository is external repository and it contains branch "branch1". "C" is an internal repository (special repository for some people). "C" repository may be created with command:

> $ git clone --bare B .

For "C" repository working set isn't required, so it may be bare, I think. This new "C" repository contains branch "branch1". Imagine that somebody has created a new branch "branch2" in the repository "B". I don't know what I should do with repository "C" to make the branch "branch2" available on repository "C". Command:

> $ git fetch origin 
doesn't work. Next command for repository "C":
> $ git branch -a 
always shows only branch "branch1"  but never branch "branch2".
Could you help me, please?
Thank you!
Next: Carlos Martín Nieto
Message 1 of 4 in “fetch for bare repository”
  1. Dmitry A. AshkadovJan 13, 2012
  2. Carlos Martín NietoJan 13, 2012
  3. Dmitry A. AshkadovJan 13, 2012
  4. Carlos Martín NietoJan 13, 2012

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.