Unable to do “git push” to newly created branch [closed]

江枫思渺然 提交于 2021-02-05 09:27:25

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!