试图将更改推送到github repo

时间:2011-09-14 13:08:42

标签: git github

我正在尝试将更改从我的本地计算机推送到我的github repo,但它无法正常工作。

我已在当地承诺:

nate@nate-desktop:~/PycharmProjects/TrendFollowing$ git commit -m "Change the underlying data type for time series from a list of dictionary entries to numpy arrays"
# On branch master
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   modified:   trendfollowing/breakouts.py
#   modified:   trendfollowing/extrema.py
#   modified:   trendfollowing/test/breakouts_test.py
#   modified:   trendfollowing/test/timeseries_extrema_test.py
#   modified:   trendfollowing/test/timeseries_test.py
#   modified:   trendfollowing/timeseries.py
#
no changes added to commit (use "git add" and/or "git commit -a")

接下来,我试过(只是为了确定):

nate@nate-desktop:~/PycharmProjects/TrendFollowing$ git remote add origin git@github.com:natereed/trendfollowing.git
fatal: remote origin already exists.

当我设置repo时,这个命令是由github提供的(我想)。我创建了一个测试项目,用我的仓库名称替换“test”:

nate@nate-desktop:~/PycharmProjects/TrendFollowing$ git push -u origin master
Branch master set up to track remote branch master from origin.
Everything up-to-date

为什么不推动我的改变?

已编辑:添加了遗漏的错误消息(“未添加任何更改”)

1 个答案:

答案 0 :(得分:12)

你没有承诺。 git commit -m只会提交暂存区域中的内容。使用git commit -a -m或使用git add将文件添加到暂存区域。