What's the difference between "Discard all changes" and "Stash all changes"?

huangapple go评论51阅读模式
英文:

What's the difference between "Discard all changes" and "Stash all changes"?

问题

我想撤销命令 npm create vite@latest。我想恢复我的更改,而不让它们显示在 git 记录中或保存它们。

在 Visual Studio Code 的 源代码控制 选项卡上,当你悬停在未暂存更改上方时,会出现两个按钮:

悬停在一个按钮上时,会显示:

另一个按钮上则显示:

它们之间有什么区别?

如何在 Git 命令行中复制它们的行为?

英文:

I want to undo the command npm create vite@latest. I want to revert my changes without them showing up in git log or them being saved.

In Visual Studio Code's Source Control tab there are two buttons on top of unstaged changes, which appear when you hover over them:

What's the difference between "Discard all changes" and "Stash all changes"?

On hover one says:

What's the difference between "Discard all changes" and "Stash all changes"?

And the other reads:

What's the difference between "Discard all changes" and "Stash all changes"?

What is the difference between them?

How can I replicate their behavior with the Git CLI?

答案1

得分: 6

英文:

huangapple
  • 本文由 发表于 2023年4月4日 17:12:44
  • 转载请务必保留本文链接:https://go.coder-hub.com/75927551.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定