2

I currently have an issue that I can't properly pin down at the moment.

When I try to use Git through VSCode, either through starting a Git-Bash Terminal or using the GUI tools it takes a monumental amount of time to actually run the commands.

It seems to be random, but as an example when running, "git push -u origin main" it has taken anywhere from 2:37 Minutes up to 17:03 Minutes An example just run now

In comparison when I run the exact same command on the exact same folder but instead through the stand alone GitBash it takes about 2 seconds to run.


So I was just wondering if anyone could help with either of these two things;

  • If anyone knows why it would be running this slow?
  • And is there any way I could check what it is doing when running those commands (so I can figure out why it is running that slow)

Thank you.

6/4/22 EDIT

I have tested this on another computer in our environment and then on my personal computer. Zero issues on the personal, but the computers in my work environment are still running Git Commands through VSCode very slowly.

So as I assumed, it is most likely an issue related to something in our environment (but not network related). But I still wish to know why is it taking such a long time or How can I figure this information out myself?

Mi-krater
  • 127
  • 11

1 Answers1

1

why is it taking such a long time or How can I figure this information out myself?

One possibility is to activate, in your VSCode Git bash session, GIT_TRACE2 flags, that you can see listed here.

At least:

export GIT_TRACE2_PERF=1
# your git commands
VonC
  • 1,129,465
  • 480
  • 4,036
  • 4,755
  • 1
    Thanks again! This did answer my question of seeing how I could figure this information out - running this worked perfectly! I was able to determine in my case that my Git within VSCode was hanging up on the credential manager core. I removed all the credentials, uninstalled and reinstalled vscode and git And reinstalled Git specifically without a credential manager. For now this is working for me, but if this changes I will ask another question – Mi-krater Apr 07 '22 at 01:15