我使用 git-for-windows v2.16.0 遇到了以下问题,这里也有报告:
我最初有一个干净的工作状态;'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
等。