How do I turn off GIT_TRACE?

git

Solution

As everyone said in comments, those are not actually commands. There is a command involved (`export`) but it's a shell (`bash` in your case, although there are other shells) command, not a git command. It changes the set of environment-variables that the shell provides to other commands.

So, you just need to un-do the thing you did in bash, with another bash command.

You can use SirBraneDamuj's method:

export GIT_TRACE_PACKET=0 GIT_TRACE=0

This keeps those variables in the environment but changes their value. Or, you can:

unset GIT_TRACE_PACKET GIT_TRACE

which removes those two names from the set of environment variables entirely. The effect on git will be the same either way. (For some other commands, and some other variables, there's sometimes a difference between "set to 0 or to empty-string" vs "not set at all", so it's worth remembering both methods.)

Problem

I suddenly started receiving permission denied errors when trying to `fetch` from our git server. According to this document, I used the `GIT_TRACE_PACKET` AND `GIT_TRACE` commands. We found the problem and fixed it, but now every git command I run is getting traced. Can someone tell me how to turn this function off?

Original source