[英]Visual Studio Team Explorer - View Git Commands
New versions of Visual Studio Team Explorer has built in support for Git.新版本的 Visual Studio Team Explorer 内置了对 Git 的支持。
I want to know if there is an option to view the Git commands executed while using the Team explorer for Git actions like Commit and Push.我想知道是否有一个选项可以查看在使用团队资源管理器执行 Git 操作(如 Commit 和 Push)时执行的 Git 命令。
Also would be better to have an option to view the other commands executed by Team Explorer like fetching status.最好有一个选项来查看团队资源管理器执行的其他命令,例如获取状态。
Are those features available with the current Visual Studio?当前的 Visual Studio 是否提供这些功能?
Edit: VisualStudio no more use libgit2sharp but use pure git commands but that changes nothing to the fact that you can't see the commands run. 编辑:VisualStudio不再使用libgit2sharp但使用纯git命令,但这不会改变您无法看到命令运行的事实。
No, there is no option to do that. 不,没有选择这样做。 And that seems quite impossible because Visual Studio don't run git commands but use the library libgit2sharp to manage the git repositories.
这似乎是不可能的,因为Visual Studio不运行git命令,而是使用库libgit2sharp来管理git存储库。
If you use the git GUI 'GitExtensions', there is a possibility to see all the git commands run (but unfortunately, that is difficult to understand because the GUI run a lot of commands). 如果你使用git GUI'GitExtensions',就有可能看到所有的git命令都运行(但不幸的是,这很难理解,因为GUI运行了很多命令)。
Git has a number of traces embedded which you can turn on by use git's tracing environment variables. Git嵌入了许多跟踪,您可以使用git的跟踪环境变量打开它们。 To enable basic general logging:
要启用基本常规日志记录:
setx GIT_TRACE %UserProfile%\\git.log
setx GIT_TRACE %UserProfile%\\git.log
To disable logging: 要禁用日志记录:
setx GIT_TRACE ""
setx GIT_TRACE ""
Should you want to do other types of git tracing, you can also turn on other traces at the command line and point them at the same log file: 如果要进行其他类型的git跟踪,还可以在命令行打开其他跟踪并将它们指向同一个日志文件:
Run setx GIT_TRACE_CURL %UserProfile%\\git.log
运行
setx GIT_TRACE_CURL %UserProfile%\\git.log
Run setx GCM_TRACE %UserProfile%\\git.log
运行
setx GCM_TRACE %UserProfile%\\git.log
etc 等等
See more environment variable examples at: 查看更多环境变量示例:
Git Internals - Environment Variables Git Internals - 环境变量
and 和
How can I debug git/git-shell related problems? 如何调试git / git-shell相关问题?
The official Visual Studio Git tutorial does not mention that feature at all. 官方Visual Studio Git教程根本没有提到该功能。
As this uservoice suggestion suggests, going to command-line and repeating the command (when the one done by Visual Studio failed) is the current method to know more about what is going on. 正如这个uservoice建议所示,进入命令行并重复命令(当Visual Studio完成的命令失败时)是当前的方法,可以更多地了解正在发生的事情。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.