<p>我有一个忽略secret.py的规则(在我的例子中是production.py),一旦我添加了.gcloudignore,github就不再遵循这个规则了。。。
gitignore和gcloudignore之间是否存在某种我不知道的规则覆盖</p>
<pre><code>my-project/
.git
.gitignore
my-project/
.gcloudignore
settings/
base.py
local.py
production.py
</code></pre>
<p>我的.gitignore:</p>
<pre><code>my-project/my-project/settings/production.py
my-project/my-project/settings/local.py
</code></pre>
<p>my.gcloud忽略:</p>
<pre><code># 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
</code></pre>
<p>最终结果是“local.py”不会被推送到谷歌云或github。
然而,“production.py”被推送到github和gcloud</p>