小编Dec*_*eca的帖子

git stash throws error没有本地更改要保存

我已经向本地分支添加了新文件。在运行命令时,git status它给出以下输出:

# On branch MyLocBranch
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#   mypath/nextDir/myfile.py
nothing added to commit but untracked files present (use "git add" to track)
Run Code Online (Sandbox Code Playgroud)

这很好,因为我有未跟踪的文件,并且在终端中以红色显示。

现在,为了存储此更改,我运行了命令git stashgit stash save "some message"。但是我得到了No local changes to save奇怪的错误。这些更改应该已经隐藏。

git

3
推荐指数
2
解决办法
2996
查看次数

标签 统计

git ×1