Visual Studio 团队资源管理器 - 查看 Git 命令 [英] Visual Studio Team Explorer - View Git Commands

查看:27
本文介绍了Visual Studio 团队资源管理器 - 查看 Git 命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

新版本的 Visual Studio Team Explorer 内置了对 Git 的支持.

New versions of Visual Studio Team Explorer has built in support for Git.

我想知道是否有选项可以查看在使用团队资源管理器执行提交和推送等 Git 操作时执行的 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.

还有一个选项会更好地查看 Team Explorer 执行的其他命令,例如获取状态.

Also would be better to have an option to view the other commands executed by Team Explorer like fetching status.

这些功能在当前的 Visual Studio 中可用吗?

Are those features available with the current Visual Studio?

推荐答案

Git 嵌入了许多跟踪,您可以使用 git 的跟踪环境变量打开它们.要启用基本的常规日志记录:

Git has a number of traces embedded which you can turn on by use git's tracing environment variables. To enable basic general logging:

  1. 打开命令提示符
  2. 运行 setx GIT_TRACE %UserProfile%git.log
  3. 重新启动 Visual Studio 并执行 git 命令.
  4. 检查 git.log 文件

禁用日志记录:

  1. 打开命令提示符
  2. 运行 setx GIT_TRACE ""
  3. 重新启动 Visual Studio.

如果你想做其他类型的git跟踪,也可以在命令行开启其他跟踪,指向同一个日志文件:
运行 setx GIT_TRACE_CURL %UserProfile%git.log
运行 setx GCM_TRACE %UserProfile%git.log

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:
Run setx GIT_TRACE_CURL %UserProfile%git.log
Run setx GCM_TRACE %UserProfile%git.log
etc

在以下位置查看更多环境变量示例:
Git 内部结构 - 环境变量

如何调试git/git-shell相关问题?

See more environment variable examples at:
Git Internals - Environment Variables
and
How can I debug git/git-shell related problems?

这篇关于Visual Studio 团队资源管理器 - 查看 Git 命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆