Git 会忽略这种文件吗?

发布于 2024-10-03 05:55:05 字数 68 浏览 0 评论 0原文

我怎样才能忽略这样的文件

.tmp_index.html.36436~

How can I ignore files like this one

.tmp_index.html.36436~

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

忆沫 2024-10-10 05:55:05

将模式放入 .gitignore 文件中。

*~

Put the pattern in your .gitignore file.

*~
メ斷腸人バ 2024-10-10 05:55:05

.gitignore 文件可以使用通配符,因此您可以执行类似的操作

echo ".tmp_index.html.*~" >> .gitignore

The .gitignore file can take wildcards, so you could do something like

echo ".tmp_index.html.*~" >> .gitignore
殤城〤 2024-10-10 05:55:05

这在一定程度上取决于可以生成的所有文件名。根据示例,您似乎想忽略以 .tmp_index.html 前缀开头的文件。如果是这样,请将以下内容添加到您的 .gitignore 文件中

.tmp_index.html*

That depends a bit on what all file names can be generated. Based on the example though it looks like you want to ignore files which begin with the .tmp_index.html prefix. If so then add the following to your .gitignore file

.tmp_index.html*

把时间冻结 2024-10-10 05:55:05

将名为 .gitignore 的文件添加到包含 git 存储库的文件夹的根目录,并将以下行添加到其中:

*.tmp*

Add a file named .gitignore to the root directory of the folder that contains your git repository and add this line into it:

*.tmp*
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文