Search code examples
git.net-corenuke-build

Very slow git rev-parse


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


Solution

  • 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