求助:git 推送时怎样忽略掉 .gitignore

 手机用户2502862865 发布于 2022-10-25 09:38

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

2 个回答
  • 在.gitigonre中加入他本身就行了、

    2022-10-26 23:01 回答
  • 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的回答.

    2022-10-26 23:01 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有