-1

enter image description here

As shown in the figure above; Every time you operate git command, some warning messages will appear. I found some answers on the Internet; For example, the following:

enter image description here

Only valid for git GUI; When I close the GIT GUI and reopen it, the warning message still exists; I tried another way:I modified a configuration file in the GIT installation directory enter image description here I added a line of code: unset GIT_ TRACE_ PACKET GIT_ TRACE. In this way, there will be no warning message through git GUI operation; However, when I operate through the console of idea, the warning message still exists and cannot be eliminated; May I ask you guys how to solve this problem?

  • 1
    I can't see any reason that this question should be tagged `[java]`. Do you have any reasons to believe that your problem is related to your use of Java? – Stephen C Jan 06 '21 at 06:37

1 Answers1

1

This has nothing at all to do with .

You get this message because you have GIT_TRACE set in your environment, to a value that Git does not understand. Your scripts as written cannot change your shell's setting. See , and, e.g., Best way to set environment variables in calling shell and Can a shell script set environment variables of the calling shell?.

To unset GIT_TRACE in your current shell, run unset GIT_TRACE. To set it to a different variable, run export GIT_TRACE=value. The set of valid value-s includes 0 (off—this has the same effect as un-setting the variable), 1 and 2 (on and trace goes to stderr), higher numeric values (trace goes to an already-open file descriptor), and path names starting with /.

Any new shells you create may get GIT_TRACE set based on dot-files (e.g., .bashrc) or other startup items you have chosen. To change this, find your startup items and modify them. If your GUI creates a new shell every time you ask it to do anything, you will have to use this method.

torek
  • 448,244
  • 59
  • 642
  • 775