无法执行"git push"操作到新创建的分支 [英] Unable to do "git push" to newly created branch

查看:197
本文介绍了无法执行"git push"操作到新创建的分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循了此处的说明来创建新分支.我从克隆存储库的EC2实例中执行了以下命令:

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

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

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

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

I'm a newbie to git. Please could someone help. Thanks

推荐答案

缺少遥控器.固定使用:

The remote was missing. Fixed using:

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

这篇关于无法执行"git push"操作到新创建的分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆