{"thread":{"id":"27759","subject":"adding/tracking remote branch","startedAt":"2011-07-05T22:56:07Z","lastAt":"2011-07-05T22:56:07Z","messageCount":1,"participants":["neubyr"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"170846","messageId":"CALFxCvzNSbxP64zGp93fu=fF9h4eaoUBcyxZUyJFvWSZ3-CUEg@mail.gmail.com","threadId":"27759","inReplyTo":null,"subject":"adding/tracking remote branch","fromName":"neubyr","fromEmail":"neubyr@gmail.com","sentAt":"2011-07-05T22:56:07Z","receivedAt":"2011-07-05T22:56:07Z","isPatch":false,"sender":{"key":"neubyr@gmail.com","avatar":null},"body":"Hi,\n\nI have a git repository setup with existing remote origin URL. I am\ntrying to add a new remote URL and would like to get this remote's\nmaster (or any other) branch in my repository. I tried following\ncommands but it didn't work:\n\n$ git remote add <remote-name> <remote-url>\n$ git config branch.<branch-name>.remote <remote-name>\n$ git fetch <remote-name>\n$ git checkout -b --track <branch-name>\nrefs/remotes/<remote-name>/<remote-branch-name> # here I got branch\nstarted from my current working branch and not with remote-branch\ncontents\n\nI appreciate any help on right set of commands here. What am I missing here?\n\n--\nneuby.r\n"}]}