Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
452 views
in Technique[技术] by (71.8m points)

git - Git diff对付藏匿处(Git diff against a stash)

How can I see the changes un-stashing will make to the current working tree?

(如何查看取消对当前工作树的更改?)

I would like to know what changes will be made before applying them!

(我想知道在应用它们之前会做出哪些改变!)

  ask by Arcabard translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

See the most recent stash:

(查看最新的藏匿处:)

git stash show -p

See an arbitrary stash:

(看到任意藏匿:)

git stash show -p stash@{1}

From the git stash manpages:

(从git stash手册中:)

By default, the command shows the diffstat, but it will accept any format known to git diff (eg, git stash show -p stash@{1} to view the second most recent stash in patch form).

(默认情况下,该命令显示diffstat,但它将接受git diff已知的任何格式(例如,git stash show -p stash @ {1}以查看补丁形式的第二个最近的存储)。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...