Subject: fetch for bare repository

From: "Dmitry A. Ashkadov" <[email-masked]>
Date: Fri, 13 Jan 2012 14:42:03 +0400

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!