我試圖將更改從本地機器推送到我的github回購,並且它不工作。試圖將更改推送到github回購
我已在本地承諾:
[email protected]:~/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")
接下來,我想(只是要確定):
[email protected]:~/PycharmProjects/TrendFollowing$ git remote add origin [email protected]:natereed/trendfollowing.git
fatal: remote origin already exists.
這個命令是由github上提供的,當我設置回購(我認爲)。我創建了一個測試項目,並與我回購的名稱取代「測試」:
[email protected]:~/PycharmProjects/TrendFollowing$ git push -u origin master
Branch master set up to track remote branch master from origin.
Everything up-to-date
爲什麼不推我的變化?
編輯:新增失蹤的錯誤消息(「不加修改提交」)
你確定'git commit'的輸出沒有以下面的錯誤結束嗎? '沒有更改添加到提交(使用「git add」和/或「git commit -a」)' –
答案已經在您的屏幕上:-)(使用「git add ...」更新將提交的內容) –
Daan
實際上,我已經使用「git add」添加了所有新文件 - 這就是爲什麼我感到困惑。我認爲這是刪除沒有添加的文件?或者我必須在每個添加的文件上運行「git add」兩次? –