【问题标题】:Unable to do "git push" to newly created branch [closed]无法对新创建的分支执行“git push”[关闭]
【发布时间】:2013-11-18 22:40:27
【问题描述】:

我按照说明here 创建了一个新分支。我从克隆了存储库的 EC2 实例中执行了以下命令:

$ 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

但是 push 命令给了我以下错误:

fatal: 'origin' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

我是 git 的新手。请有人帮忙。 谢谢

【问题讨论】:

  • git remote 显示什么?
  • @raina77ow : 它什么也没显示..
  • 那么您究竟是如何克隆现有存储库的?
  • @raina77ow : git clone git@bitbucket.org:user/repo.git
  • 你们在同一个目录吗?您能否在问题中添加.git/config 内容?

标签: git git-push


【解决方案1】:

遥控器不见了。固定使用:

git remote add origin https://bitbucket.org/usr/repo

【讨论】:

  • git remote add origin https://bitbucket.org/usr/repo
  • @NilsWerner :感谢您指出 :)
猜你喜欢
  • 2020-07-20
  • 2015-08-27
  • 1970-01-01
  • 2017-04-25
  • 1970-01-01
  • 2016-01-27
  • 2016-12-18
  • 1970-01-01
  • 2021-12-08
相关资源
最近更新 更多