我使用git-for-windows v2.16.0,遇到了以下问题,here也报告了这个问题
我最初有一个干净的工作状态;输出'git status':
git status
On branch beta
nothing to commit, working tree clean然后我进行本地更改。git status的输出
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”把它们藏起来:
git stash
Saved working directory and index state WIP on beta: 2fca403 working on the console现在我的工作目录应该是干净的,但git status的输出仍然是:
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等。
发布于 2018-02-08 04:16:21
这是Git for Windows中的known bug,已在v2.16.0(3)中修复。更新到较新的版本将修复此错误。
感谢@choroba指出了报告的问题!
https://stackoverflow.com/questions/48448970
复制相似问题