以下是我的烧瓶项目结构。我在heroku上遇到nltk的问题,所以基于一些文档,我在我的项目中包含了NLTK数据文件夹,并将所有文件添加到git中并将其推送到heroku。下一次,如果我只是更改app.py文件并且只想推送app.py,那么我按照以下命令显示。但每次我进行更改并只向git添加一个文件时,提交并推送它将永远消失。
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 <mysys@mydomain.com>
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 you@example.com
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)
答案 0 :(得分:0)
推进Heroku通常需要相当长的时间,因为每次你推到Heroku: