克隆时如何忽略 .gitignore 操作?

发布于 2024-09-19 16:11:23 字数 197 浏览 1 评论 0原文

我想在克隆时忽略 .gitignore 操作?

例如)

存储库有以下文件。

A.txt Bo .gitignore <- .gitignore 定义 *.o

所以我的本地存储库在克隆时只有 A.txt。

但我希望克隆时有 A.txt Bo .gitignore 。

谢谢你们!

I wanna to ignore .gitignore action when cloning ?

for example)

Repository has following files.

A.txt B.o .gitignore <- .gitignore defines *.o

So my local repository has only A.txt when cloning.

But I want to have A.txt B.o .gitignore when cloning.

Thank you thenducks!

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

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

发布评论

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

评论(1

┈┾☆殇 2024-09-26 16:11:23

克隆与 .gitignore 无关,这些文件没有被克隆的原因很可能是......好吧......它们被忽略了!因此,如果您希望 Bo 出现在存储库中(并因此出现在克隆中),则只需使用 git add -f Bo 将该文件添加到存储库中并提交即可。

Cloning has nothing to do with .gitignore, the reason those files aren't being cloned is most likely that... well... they're ignored! So if you want B.o in the repo (and as a result, in clones) then simply add that file to the repo with git add -f B.o and commit it.

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