【发布时间】:2012-07-24 08:44:13
【问题描述】:
我正在尝试推送到 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 git@github.com:asantoya/estaciones.git
$ git push -u origin master
但我总是遇到同样的问题,我打字晚了,我得到了下一个错误
To git@github.com:asantoya/estaciones.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com: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.
【问题讨论】:
标签: ruby-on-rails github push