求助:git 推送时怎样忽略掉 .gitignore
巴扎黑
巴扎黑 2017-05-02 09:19:26
[Git讨论组]

推送时让项目里所有的.gitigonre文件都不起作用,有这个命令吗??

巴扎黑
巴扎黑

全部回复(2)
PHP中文网

The .gitignore file should be in your repository, so it should indeed be added and committed in, as git status suggests. It has to be a part of the repository tree, so that changes to it can be merged and so on.

So, add it to your repository, it should not be gitignored.

If you really want you can add .gitignore to the .gitignore file if you don't want it to be committed. However, in that case it's probably better to add the ignores to .git/info/exclude, a special checkout-local file that works just like .gitignore but does not show up in "git status" since it's in the .git folder.

See also https://help.github.com/articles/ignoring-files

注 以下文字信息来自于 http://stackoverflow.com/questions/767147/ignore-the-gitignore-file-it... August的回答.

漂亮男人

在.gitigonre中加入他本身就行了、

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号