首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >隐藏的文件在`git status` (git v.2.16.0)中显示为未更改

隐藏的文件在`git status` (git v.2.16.0)中显示为未更改
EN

Stack Overflow用户
提问于 2018-01-26 01:44:48
回答 1查看 202关注 0票数 11

我使用git-for-windows v2.16.0,遇到了以下问题,here也报告了这个问题

我最初有一个干净的工作状态;输出'git status':

代码语言:javascript
复制
git status
On branch beta
nothing to commit, working tree clean

然后我进行本地更改。git status的输出

代码语言:javascript
复制
git status
On branch beta
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/src/main/java/android_serialport_api/sample/Debug.java

no changes added to commit (use "git add" and/or "git commit -a")

然后我用“git stash”把它们藏起来:

代码语言:javascript
复制
git stash
Saved working directory and index state WIP on beta: 2fca403 working on the console

现在我的工作目录应该是干净的,但git status的输出仍然是:

代码语言:javascript
复制
git status
On branch beta
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/src/main/java/android_serialport_api/sample/Debug.java

no changes added to commit (use "git add" and/or "git commit -a")

这会导致无法git checkout等。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-02-08 04:16:21

这是Git for Windows中的known bug,已在v2.16.0(3)中修复。更新到较新的版本将修复此错误。

感谢@choroba指出了报告的问题!

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48448970

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档