带路径的 GitLog 命令

GitLog Command with Path

我尝试从不同地方的项目创建 Git 日志。 有什么解决方案可以在 Git Log 命令中添加路径吗?

我试过了,但没用:

git log --pretty=format:"%H \"%an\" %ad \"%s\"" --numstat --date=short -- Code/code1/git 

只需在日志命令前添加--git-dir

git --git-dir=Code/code1/.git log --pretty=format:"%H \"%an\" %ad \"%s\"" --numstat --date=short