Very slow git rev-parse

710 Views Asked by At

I use nuke build tools, for building my .net core app.

Does anyone have an idea why this command takes 2 minutes? This problem is present in all my projects.

git.exe rev-parse --abbrev-ref HEAD

enter image description here

1

There are 1 best solutions below

0
On BEST ANSWER

It makes sense that this is a local problem on your git installation. You can execute the following command to see why it takes so long

GIT_TRACE_PERFORMANCE=true git rev-parse --abbrev-ref HEAD

# or without the time stamp
GIT_TRACE=true git rev-parse --abbrev-ref HEAD

Check the output and you will see what is taking long time. enter image description here