Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个合并提交,我可以使用git show -m. 但是,如果我只想显示子文件夹或路径的更改,我该怎么做?我尝试这样做git show -m -- app/,但它没有显示任何内容,即使git show --stat表明存储库的该部分正在进行合并。
git show -m
git show -m -- app/
git show --stat
您可以--relative为此使用:
--relative
git show -m --relative=app/
但它会显示相对于路径中提供的目录的路径:
--relative[=<path>] 从项目的子目录运行时,可以告诉它排除目录之外的更改并使用此选项显示相对于它的路径名。<path>当您不在子目录中时(例如,在裸存储库中),您可以通过将 a作为参数来命名要相对于哪个子目录进行输出。
--relative[=<path>]
从项目的子目录运行时,可以告诉它排除目录之外的更改并使用此选项显示相对于它的路径名。<path>当您不在子目录中时(例如,在裸存储库中),您可以通过将 a作为参数来命名要相对于哪个子目录进行输出。
<path>