質問

Here is my problem:

  1. After doing some changes in my project, I executed git stash, but I did not execute git add . before.
  2. I then removed one folder I was working in before doing git stash.
  3. Finally, when I wanted to pop the changes I found that the folder was not there.

What happened? Is there any solution?

Thanks again.

役に立ちましたか?

解決

From man git stash:

git-stash - Stash the changes in a dirty working directory away

If there were untracked files (files you never "git added" to the repo), then they will not be stashed. So if you deleted the folder, you lost your work.

For the next time, you can consider using git stash --include-untracked (see man git stash).

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top