gpt4 book ai didi

git - .gitignore 忽略文件的地方

转载 作者:太空狗 更新时间:2023-10-29 14:32:50 25 4
gpt4 key购买 nike

我在做

git add db/schema.rb
The following paths are ignored by one of your .gitignore files:
db/schema.rb
Use -f if you really want to add them.
fatal: no files added

我在哪里可以找到这个被忽略的文件,参见:

cat .gitignore
.project
nbproject
.redcar
cat ~/.gitignore
.idea

~/.gitignore 用于全局忽略。

最佳答案

您可以使用 git check-ignore 轻松检查当前哪些 .gitignore 规则使您的文件在您的 git 仓库中被忽略(你必须有 git 1.8.3.3+):

cd /path/to/your/repo
git check-ignore -v -- path/to/your/file

(-v -- verbose -- 选项对于查看规则很重要)

关于git - .gitignore 忽略文件的地方,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22393830/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com