Sourcetree 显示未暂存和 gitignored 的文件

问题描述 投票:0回答:2

我对 Sourcetree 有疑问。 在某个存储库中,应用程序向我显示了 gitinored 的未暂存文件: sourcetree unstaged pane

起初我以为问题出在 gitignore 文件上,或者我之前已经暂存了这些文件。 显然两者都不是真的。

更奇怪的问题是,当我使用 git shell 并输入:

git 状态

我得到的只是我真正想要跟踪修改后的两个源文件。

uname@compname MINGW64 /c/programing/SailingRaceCourseManager/SailingRaceCourseManager (develop)
$ git status
On branch develop
Your branch is up-to-date with 'origin/develop'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   app/build.gradle
        modified:   app/src/main/java/com/compname/appname/geographical/OwnLocation.java

no changes added to commit (use "git add" and/or "git commit -a")
git atlassian-sourcetree
2个回答
2
投票

我的错误。

结果发现过滤\排序框设置为“忽略的文件”: (我花了一个多月才弄清楚...)

enter image description here


0
投票

我正在与朋友分享的一个项目也遇到同样的问题。我们不小心将一个没有 gitignore 文件的项目推送到 GitHub,并上传了不必要的文件。现在,每当有人想要推送或合并时,除了修改的文件之外,许多文件在 sourcetree 中显示为未暂存,即使我们已经上传了 gitignore 文件并尝试删除 git 缓存,我们也无法删除它。 该怎么办?

© www.soinside.com 2019 - 2024. All rights reserved.