【发布时间】:2012-08-01 04:53:50
【问题描述】:
我有一种情况,我修改的文件没有显示为修改后的文件。
我还能提交那个文件吗?
我可以将列为未更改文件的文件添加到已更改文件吗?谢谢!
更新: 当我尝试添加文件时,终端给出这样的错误:
The following paths are ignored by one of your .gitignore files:
folderpath/filename.java
Use -f if you really want to add them.
fatal: no files added
但是当我打开我的 .gitignore 文件时:
bin
gen
#built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated GUI files
*R.java
# Mac OS file
.DS_Store
和信息/排除
# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~
我非常确定我的文件夹路径及其文件名不包含在 .gitignore 和排除文件中
【问题讨论】:
-
嗨,eckes ..我在其他帖子上试过你的答案:-添加了文件夹-我的文件不在 .gitignore 和排除列表中-当我尝试输入 git config --global core .excludesfile,终端不打印任何东西... - git status --ignored 显示我所有要提交的更改列表(听起来很奇怪吧?)
-
是的,我存放该文件的文件夹不在 bin/gen 中 :)
-
感谢您的解释!我从来不知道这样的规则。不,我的文件夹路径名不包含 gen 或 bin
-
您能否请发布完整路径和完整文件名?这将帮助我们找出问题所在!
-
嗨,eckes..对不起,我不能透露完整的路径,因为它是凭证:(
标签: git github git-commit git-add