克隆时如何忽略 .gitignore 操作?
我想在克隆时忽略 .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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
克隆与 .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.