gpt4 book ai didi

git -/dev/null 在 git show commit 中的意义是什么?

转载 作者:IT王子 更新时间:2023-10-29 00:59:14 26 4
gpt4 key购买 nike

---/dev/nullgit show commit 输出中表示什么?

这是一个新文件的添加,所以我假设它是说没有删除任何内容,但为什么要引用 /dev/null

$ git show a395a
commit a395a7bb4abcc606022ac14a07794b2d3c18bd5b
Author: David Banks <BanksySan@googlemail.com>
Date: Sun Apr 12 17:41:08 2015 +0100

My first commit.

diff --git a/test.txt b/test.txt
new file mode 100644
index 0000000..e965047
--- /dev/null
+++ b/test.txt
@@ -0,0 +1 @@
+Hello

最佳答案

意思是因为test.txt是一个新文件,在显示的diff中,它被比作“nothing”; "file"/de​​v/null。

关于git -/dev/null 在 git show commit 中的意义是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29591976/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com