~/www> git branch --track live origin/master
fatal: Not a valid object name: \'origin/master\'.
~/www> git remote
origin
~/www> git branch
* master
test_branc
Your output from git remote
confirms that you've successfully added your origin
remote.
I expect the problem is that you haven't yet created the remote-tracking branch(es). If you do git branch -r
, it probably won't output anything. So origin/master
is not a valid object name because that remote-tracking branch doesn't exist yet.
The solution is to do git fetch origin
to create the remote-tracking branch(es). If you then do git branch -r
, you'll see origin/master
now exists.