`git stash create` 不 return 哈希
`git stash create` does not return a hash
示例 (bash):
> cd ~/repo1
> git stash create
显然出了点问题,也许已经有东西藏起来了?
> git stash drop
No stash entries found
也许 git 有问题,随机选择其他 存储库 并 重新运行 :
> cd ~/repo2
> git stash create
f6fed634ce4de28d8696de39f6a338df8edef59c
这是怎么回事?
如果没有要存储的东西,没有未暂存或暂存的更改,它不会生成提交对象。
$ git status
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: this
$ git stash create
a42c068d4b8139a6d572ad04e77f1bd0057b3408
$ git restore this
$ git status
On branch master
nothing to commit, working tree clean
$ git stash create
$
示例 (bash):
> cd ~/repo1
> git stash create
显然出了点问题,也许已经有东西藏起来了?
> git stash drop
No stash entries found
也许 git 有问题,随机选择其他 存储库 并 重新运行 :
> cd ~/repo2
> git stash create
f6fed634ce4de28d8696de39f6a338df8edef59c
这是怎么回事?
如果没有要存储的东西,没有未暂存或暂存的更改,它不会生成提交对象。
$ git status
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: this
$ git stash create
a42c068d4b8139a6d572ad04e77f1bd0057b3408
$ git restore this
$ git status
On branch master
nothing to commit, working tree clean
$ git stash create
$