2012-07-25 41 views
0

我试着去推到github上 我遵循的步骤: (这些行林位于我的应用程序目录之前)未能推动一些裁判

$ mkdir estaciones 
$ cd estaciones 
$ git init 
>>Initialized empty Git repository in /Users/armandodejesussantoyareales/Documents/project_newbie/Estaciones/estaciones/.git/ 
$ touch README 
$ git add README 
$ git commit -m "phase 3 estaciones" 
>>[master (root-commit) 4462be3] phase 3 estaciones 
0 files changed, 0 insertions(+), 0 deletions(-) 
create mode 100755 README 

(我不知道这消息是错误)

$ git remote add origin [email protected]:asantoya/estaciones.git 
$ git push -u origin master 

但始终我有同样的问题,晚了,我键入我得到了一个错误

To [email protected]:asantoya/estaciones.git 
! [rejected]  master -> master (non-fast-forward) 
error: failed to push some refs to '[email protected]:asantoya/estaciones.git' 
To prevent you from losing history, non-fast-forward updates were rejected 
Merge the remote changes (e.g. 'git pull') before pushing again. See the 
'Note about fast-forwards' section of 'git push --help' for details. 

回答

0

这意味着远程存储库已经有一个主分支,并且在您向本地副本进行提交后添加了该分支中的内容。

git clone https://github.com/asantoya/estaciones.git 
git checkout -b nameofyourbranch master 

添加一些文件等

git commit -a -m "Your commit message" 
git push origin nameofyourbranch 
+0

感谢:这是通过从GitHub克隆回购,再加入您的更改,然后推指代码可见的https://github.com/asantoya/estaciones

开始为了回答我想试试 – Asantoya17 2012-07-25 20:33:24

+0

如果想要添加所有文件,命令是:“git add”。分辩? – Asantoya17 2012-07-25 20:38:35

+0

我可以如何替换现有的https://github.com/asantoya/estaciones – Asantoya17 2012-07-25 20:50:00

相关问题