adding/tracking remote branch
- From
- neubyr <neubyr@gmail.com>
- Date
- Jul 5, 2011, 22:56 UTC
- Message-ID
- <CALFxCvzNSbxP64zGp93fu=fF9h4eaoUBcyxZUyJFvWSZ3-CUEg@mail.gmail.com>
Hi,
I have a git repository setup with existing remote origin URL. I am trying to add a new remote URL and would like to get this remote's master (or any other) branch in my repository. I tried following commands but it didn't work:
$ git remote add <remote-name> <remote-url> $ git config branch.<branch-name>.remote <remote-name> $ git fetch <remote-name> $ git checkout -b --track <branch-name> refs/remotes/<remote-name>/<remote-branch-name> # here I got branch started from my current working branch and not with remote-branch contents
I appreciate any help on right set of commands here. What am I missing here?
-- neuby.r