fetch for bare repository
- From
- Dmitry 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!