Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
396 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 Reply

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}以查看补丁形式的第二个最近的存储)。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...