Heroku git:clone 引起了问题

Heroku git:clone has caused problems

我正在使用 Heroku 来托管我的应用程序。我的桌面上有一个我一直在其中工作的本地文件夹,然后使用 git push heroku master 将我的更改推送到服务器。

我错误地使用了 git clone,它在我的目录中创建了另一个文件夹(我认为它做了其他事情)。

我删了用了git add .

当我这样做时,它已经准备好 所有 我的文件准备提交:

modified: index.php
modified: login.php
modified: register.php

etc etc etc for hundreds of files...

我害怕提交和推送,以防它弄乱我的应用程序。

为什么要这样做?提交是否安全?

git diff --stat --cached heroku/master

产出

 .DS_Store                                  | Bin
 Procfile                                   |   0
 app/.DS_Store                              | Bin
 app/README.md                              |   0
 app/config.php                             |   0

我的所有文件一直到

 vendor/heroku/heroku-buildpack-php/support/build/_conf/php/php.ini  |0
:

然后

git diff --cached

产出

diff --git a/latest.dump b/latest.dump
new file mode 100644
index 0000000..b4d47cf
Binary files /dev/null and b/latest.dump differ
diff --git a/output.sql b/output.sql
new file mode 100644
index 0000000..62320e0
--- /dev/null
+++ b/output.sql
@@ -0,0 +1,141 @@
+--
+-- PostgreSQL database dump
+--

对我的数据库等进行更多数据库操作

git diff --cached heroku/master

显示

diff --git a/app/phq-9.php b/app/reg.php
old mode 100644
new mode 100755
diff --git a/app/preferences.php b/app/login.php
old mode 100644
new mode 100755
diff --git a/app/question_style.css b/app/style.css
old mode 100644
new mode 100755
diff --git a/app/script.js b/app/script.js
old mode 100644
new mode 100755
diff --git a/app/sleep_diary.php b/app/diary.php
old mode 100644
new mode 100755
diff --git a/app/stylesheet.css b/app/stylesheet.css
old mode 100644
new mode 100755
diff --git a/composer.json b/composer.json
old mode 100644
new mode 100755
diff --git a/composer.lock b/composer.lock
old mode 100644
new mode 100755
diff --git a/latest.dump b/latest.dump
new file mode 100644
index 0000000..b4d47cf
Binary files /dev/null and b/latest.dump differ
:

database.dump 文件是一个新文件。您可能不想将其包含在您的存储库中(数据很少属于那里),但我对您的应用程序了解不多,无法确定。

至于您的其余暂存更改,git diff --cached 表明文件已变为可执行文件:

diff --git a/app/phq-9.php b/app/reg.php
old mode 100644
new mode 100755

Git 只跟踪一个文件权限位:可执行位。文件为 644(所有者 read/write、组和其他只读)或 755(所有者 read/write/执行、组和其他 read/execute)。

如果这是您想要的,您可以提交更改。如果不是,您可以丢弃它们。就个人而言,我会非常仔细地检查输出以确保我知道我正在丢弃什么。

我不确定为什么你的文件变成了可执行文件。您的问题中没有任何内容看起来会导致这种情况发生。