我有一条规则可以忽略secret.py(在我的情况下是production.py),一旦我添加了.gcloudignore,github就停止遵循该规则......在gitignore和gcloudignore之间是否存在某种我不知道的规则覆盖?
my-project/
.git
.gitignore
my-project/
.gcloudignore
settings/
base.py
local.py
production.py
我的.gitignore:
my-project/my-project/settings/production.py
my-project/my-project/settings/local.py
我的 .gcloudignore:
# This file specifies files that are *not* uploaded to Google Cloud Platform
# using gcloud. It follows the same syntax as .gitignore, with the addition of
# "#!include" directives (which insert the entries of the given .gitignore-style
# file at that point).
#
# For more information, run:
# $ gcloud topic gcloudignore
#
.gcloudignore
# If you would like to upload your .git directory, .gitignore file or files
# from your .gitignore file, remove the corresponding line
# below:
.git
.gitignore
*.sqlite3
settings/local.py
最终结果是“local.py”没有被推送到谷歌云或 github。但是,“production.py”被推送到 github 和 gcloud。