Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Team Explorer - View Git Commands

New versions of Visual Studio Team Explorer has built in support for 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.

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?

like image 299
Habeeb Avatar asked Jul 31 '16 07:07

Habeeb


1 Answers

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. Open Command Prompt
  2. Run setx GIT_TRACE %UserProfile%\git.log
  3. Restart Visual Studio and Execute the git commands.
  4. Examine the git.log file

To disable logging:

  1. Open Command Prompt
  2. Run setx GIT_TRACE ""
  3. Restart Visual Studio.

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

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

like image 133
Gary Barrett Avatar answered Oct 05 '22 06:10

Gary Barrett