问题
I followed instructions here to create a new branch. I executed the following commands from an EC2 Instance where I've cloned the repo:
$ git branch
* master
$ git branch solr
$ git checkout solr
$ git branch
master
* solr
$ git add .
$ git commit -m "adding a change from the feature branch"
$ git checkout master
$ git push origin solr
But the push command gives me the following error:
fatal: 'origin' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
I'm a newbie to git. Please could someone help. Thanks
回答1:
The remote was missing. Fixed using:
git remote add origin https://bitbucket.org/usr/repo
来源:https://stackoverflow.com/questions/19833337/unable-to-do-git-push-to-newly-created-branch