Git添加“不变”文件到舞台 [英] Git adding "unchanged" files to the stage
本文介绍了Git添加“不变”文件到舞台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
对于我正在开发的项目,我想使用:
For a project I'm working on, I want to use:
git add . -A
向舞台添加一些文件。问题是Git认为这些文件与上次提交没有任何关系,所以它们被忽略。然而,我亲自更改了该文件,但Git仍然认为该文件保持不变。
to add some files to the stage. The problem is that Git thinks these files are unchanged from the last commit, so they are ignored. However, I personally changed the file, but Git still sees the file as unchanged.
如何强制将单个文件添加到我的存储库?
How can I "forcefully" add that single file to my repository?
推荐答案
检查您的 .gitignore 文件,必须有一些与此文件匹配的模式,
或者您可以使用 git add。 -f
强制添加这些文件。
check your .gitignore file there must be some pattern matching this file which is excluding file from being staged.
Or you can use git add . -f
to forcely add these files.
这篇关于Git添加“不变”文件到舞台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文