下面是我的燒瓶項目結構。我在heroku上遇到了nltk的問題,所以根據一些文檔,我在我的項目中包含了NLTK數據文件夾,並將所有文件添加到git中並將其推送到heroku。下一次,如果我只是更改app.py文件,並且只想推送app.py,那麼我按照下面的命令顯示。但是每次我做出改變並且只添加一個文件到git中時,提交併推送它就會一直持續下去。只推送一個文件到Heroku的問題
C:\Users\mysys\mywebservices>dir
Volume in drive C is OSDisk
Volume Serial Number is B08D-8A75
Directory of C:\Users\mysys\mywebservices
08/04/2016 02:18 PM <DIR> .
08/04/2016 02:18 PM <DIR> ..
08/05/2016 10:40 AM 18 .gitignore
08/05/2016 12:07 PM 1,546 app.py
08/03/2016 06:52 PM 369 instructions.txt
08/03/2016 06:42 PM <DIR> mywebservices
08/04/2016 02:30 PM <DIR> nltk_data
08/03/2016 06:38 PM 21 Procfile
08/04/2016 02:33 PM 135 requirements.txt
5 File(s) 2,089 bytes
4 Dir(s) 12,047,900,672 bytes free
以下是使用的命令。即使是app.py的小改動,也會推送大量文件。我錯過了什麼,請讓我知道。
C:\Users\mysys\mywebservices>git status
On branch master
Your branch is ahead of 'origin/master' by 19 commits.
(use "git push" to publish your local commits)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: app.py
no changes added to commit (use "git add" and/or "git commit -a")
C:\Users\mysys\mywebservices>git add app.py
C:\Users\mysys\mywebservices>git commit -m "testing nltk"
[master 5990375] testing nltk
Committer: mysys <[email protected]>
Your name and email address were configured automatically based
on your mysys and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:
git config --global user.name "Your Name"
git config --global user.email [email protected]
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author
1 file changed, 1 insertion(+), 1 deletion(-)
C:\Users\mysys\mywebservices>
C:\Users\mysys\mywebservices>git push heroku master
Counting objects: 23025, done.
Delta compression using up to 4 threads.
Compressing objects: 82% (18925/22974)
你是不是按一個承諾,你是推19個提交:'你的分支進取「的由來/大師」的19 commits.' – 1615903
@ 1615903但什麼是隻更新文件的方式,我可以從heroku向本地做出pull請求並進行更改並再次推送? – yome