Git获取并包含所有.gitignore文件 [英] Git fetch and include all .gitignore files

查看:145
本文介绍了Git获取并包含所有.gitignore文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在包含被git忽略的文件的同时获取远程git仓库?最好包括.gitignore文件本身所以,如果我想从远程应用程序库中获取所有文件,即使那些不在git存储库中的文件也是如此,因为它们位于.gitignore文件中。 gitignore文件 - 真正做到这一点的唯一方法是使用ftp或其他软件下载文件并附加远程回购?

解决方案

文件从来没有添加到存储库中,因为它们被git忽略,无法从远程存储库中检索,因为它们不在首位。



添加或强制添加后被忽略的文件就像任何其他文件一样在存储库中,无需任何特殊操作即可获取。对于 .gitignore 文件也是如此。


Is there any way to fetch a remote git repo while including the files ignored by git? Optimally including the .gitignore files themselves

So if I want to grab all the files from a remote application repository, even those not in the git repository because they are on the .gitignore file - only way to really do this is download files with ftp or something and attach the remote repo aftwards?

解决方案

Files that have never been added to the repository, because they are ignored by git, can't be retrieved from the remote repository, because, well, they are not there in the first place.

Files that have been ignored after they have been added or that have been force added are in the repository just like any other file and will be fetched without any special action. The same is true for .gitignore files.

这篇关于Git获取并包含所有.gitignore文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆