我想在我的git repo中包含Makefile,但是我得到了这样的消息:
$ git add Makefile
The following paths are ignored by one of your .gitignore files:
Makefile
Use -f if you really want to add them.
fatal: no files added
Run Code Online (Sandbox Code Playgroud)
在我的repo .gitignore文件中,我有:
*.pdf
Run Code Online (Sandbox Code Playgroud)
在我的〜/ .gitignore_global中
#-*-shell-script-*-
# Python
*.pyc
# Latex
*.aux
*.bbl
*.blg
*.log
build
# Mac
*~
.DS_Store
Run Code Online (Sandbox Code Playgroud)
我的.gitignore_global是在git配置中:
$ git config -l
core.excludesfile=/Users/marcos/.gitignore_global
Run Code Online (Sandbox Code Playgroud)
我的回购不在另一个回购中.为什么Git忽略我的Makefile?
引用gitignore 手册(强调我的):
gitignore 文件中的每一行都指定一个模式。当决定是否忽略路径时,git 通常会检查来自多个源的gitignore 模式,按照以下优先级顺序,从最高到最低(在一个优先级内,最后匹配的模式决定结果):
(...)
- 从$GIT_DIR/info/exclude读取模式。
所以你必须检查 的内容.git/info/exclude。
| 归档时间: |
|
| 查看次数: |
2093 次 |
| 最近记录: |