When i commit changes via Github Desktop, pre-commit cannot handle the changes and commit them but overwrites all other stages changes (the once i didn’t intent to commit now) by its improvements.
This appears since during a commit in Github Desktop to my local branch, Avast free antivirus interrupted the process to check some file for virus. Since i didn’t want Avast to interrupt it i canceled the scan, probably making things worse.
Now i get the following message when i’m trying to commit:error message
I tried already to use
- git reset, git update-indes,
- delete the repo and set it up new
- use pre-commit uninstall and install
- use pre-commit run –all-files
On another machine, the same repo runs smoothly.
Does anyone has an idea what and how i have to reset to solve this issue?
Here is the pre-commit log:
version information
<code>pre-commit version: 3.7.1
git --version: git version 2.45.1.windows.1
3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)]
sys.executable: C:UsersUsrNameDokumenteGitHubRepoName.envScriptspython.exe
<code>pre-commit version: 3.7.1
git --version: git version 2.45.1.windows.1
sys.version:
3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)]
sys.executable: C:UsersUsrNameDokumenteGitHubRepoName.envScriptspython.exe
os.name: nt
sys.platform: win32
</code>
pre-commit version: 3.7.1
git --version: git version 2.45.1.windows.1
sys.version:
3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)]
sys.executable: C:UsersUsrNameDokumenteGitHubRepoName.envScriptspython.exe
os.name: nt
sys.platform: win32
error information
<code>An unexpected error has occurred: CalledProcessError: command: ('C:\Users\UsrName\AppData\Local\GitHubDesktop\app-3.4.2\resources\app\git\mingw64\bin\git.EXE', '-c', 'core.autocrlf=false', 'apply', '--whitespace=nowarn', 'C:\Users\UsrName\.cache\pre-commit\patch1719821150-18184')
error: missing config value GIT_CONFIG_VALUE_0
fatal: unable to parse command-line config
<code>An unexpected error has occurred: CalledProcessError: command: ('C:\Users\UsrName\AppData\Local\GitHubDesktop\app-3.4.2\resources\app\git\mingw64\bin\git.EXE', '-c', 'core.autocrlf=false', 'apply', '--whitespace=nowarn', 'C:\Users\UsrName\.cache\pre-commit\patch1719821150-18184')
return code: 128
stdout: (none)
stderr:
error: missing config value GIT_CONFIG_VALUE_0
fatal: unable to parse command-line config
</code>
An unexpected error has occurred: CalledProcessError: command: ('C:\Users\UsrName\AppData\Local\GitHubDesktop\app-3.4.2\resources\app\git\mingw64\bin\git.EXE', '-c', 'core.autocrlf=false', 'apply', '--whitespace=nowarn', 'C:\Users\UsrName\.cache\pre-commit\patch1719821150-18184')
return code: 128
stdout: (none)
stderr:
error: missing config value GIT_CONFIG_VALUE_0
fatal: unable to parse command-line config
<code>Traceback (most recent call last):
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitstaged_files_only.py", line 29, in _git_apply
cmd_output_b('git', *args)
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitutil.py", line 111, in cmd_output_b
raise CalledProcessError(returncode, cmd, stdout_b, stderr_b)
pre_commit.util.CalledProcessError: command: ('C:\Users\UsrName\AppData\Local\GitHubDesktop\app-3.4.2\resources\app\git\mingw64\bin\git.EXE', 'apply', '--whitespace=nowarn', 'C:\Users\UsrName\.cache\pre-commit\patch1719821150-18184')
error: missing config value GIT_CONFIG_VALUE_0
fatal: unable to parse command-line config
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitstaged_files_only.py", line 86, in _unstaged_changes_cleared
_git_apply(patch_filename)
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitstaged_files_only.py", line 32, in _git_apply
cmd_output_b('git', '-c', 'core.autocrlf=false', *args)
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitutil.py", line 111, in cmd_output_b
raise CalledProcessError(returncode, cmd, stdout_b, stderr_b)
pre_commit.util.CalledProcessError: command: ('C:\Users\UsrName\AppData\Local\GitHubDesktop\app-3.4.2\resources\app\git\mingw64\bin\git.EXE', '-c', 'core.autocrlf=false', 'apply', '--whitespace=nowarn', 'C:\Users\UsrName\.cache\pre-commit\patch1719821150-18184')
error: missing config value GIT_CONFIG_VALUE_0
fatal: unable to parse command-line config
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitstaged_files_only.py", line 29, in _git_apply
cmd_output_b('git', *args)
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitutil.py", line 111, in cmd_output_b
raise CalledProcessError(returncode, cmd, stdout_b, stderr_b)
pre_commit.util.CalledProcessError: command: ('C:\Users\UsrName\AppData\Local\GitHubDesktop\app-3.4.2\resources\app\git\mingw64\bin\git.EXE', 'apply', '--whitespace=nowarn', 'C:\Users\UsrName\.cache\pre-commit\patch1719821150-18184')
error: missing config value GIT_CONFIG_VALUE_0
fatal: unable to parse command-line config
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commiterror_handler.py", line 73, in error_handler
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitmain.py", line 389, in main
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitcommandshook_impl.py", line 271, in hook_impl
return retv | run(config, store, ns)
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitcommandsrun.py", line 418, in run
with contextlib.ExitStack() as exit_stack:
File "C:UsersUsrNameAppDataLocalProgramsPythonPython311Libcontextlib.py", line 586, in __exit__
File "C:UsersUsrNameAppDataLocalProgramsPythonPython311Libcontextlib.py", line 571, in __exit__
File "C:UsersUsrNameAppDataLocalProgramsPythonPython311Libcontextlib.py", line 144, in __exit__
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitstaged_files_only.py", line 112, in staged_files_only
with _intent_to_add_cleared(), _unstaged_changes_cleared(patch_dir):
File "C:UsersUsrNameAppDataLocalProgramsPythonPython311Libcontextlib.py", line 144, in __exit__
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitstaged_files_only.py", line 96, in _unstaged_changes_cleared
_git_apply(patch_filename)
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitstaged_files_only.py", line 32, in _git_apply
cmd_output_b('git', '-c', 'core.autocrlf=false', *args)
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitutil.py", line 111, in cmd_output_b
raise CalledProcessError(returncode, cmd, stdout_b, stderr_b)
pre_commit.util.CalledProcessError: command: ('C:\Users\UsrName\AppData\Local\GitHubDesktop\app-3.4.2\resources\app\git\mingw64\bin\git.EXE', '-c', 'core.autocrlf=false', 'apply', '--whitespace=nowarn', 'C:\Users\UsrName\.cache\pre-commit\patch1719821150-18184')
error: missing config value GIT_CONFIG_VALUE_0
fatal: unable to parse command-line config
<code>Traceback (most recent call last):
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitstaged_files_only.py", line 29, in _git_apply
cmd_output_b('git', *args)
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitutil.py", line 111, in cmd_output_b
raise CalledProcessError(returncode, cmd, stdout_b, stderr_b)
pre_commit.util.CalledProcessError: command: ('C:\Users\UsrName\AppData\Local\GitHubDesktop\app-3.4.2\resources\app\git\mingw64\bin\git.EXE', 'apply', '--whitespace=nowarn', 'C:\Users\UsrName\.cache\pre-commit\patch1719821150-18184')
return code: 128
stdout: (none)
stderr:
error: missing config value GIT_CONFIG_VALUE_0
fatal: unable to parse command-line config
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitstaged_files_only.py", line 86, in _unstaged_changes_cleared
_git_apply(patch_filename)
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitstaged_files_only.py", line 32, in _git_apply
cmd_output_b('git', '-c', 'core.autocrlf=false', *args)
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitutil.py", line 111, in cmd_output_b
raise CalledProcessError(returncode, cmd, stdout_b, stderr_b)
pre_commit.util.CalledProcessError: command: ('C:\Users\UsrName\AppData\Local\GitHubDesktop\app-3.4.2\resources\app\git\mingw64\bin\git.EXE', '-c', 'core.autocrlf=false', 'apply', '--whitespace=nowarn', 'C:\Users\UsrName\.cache\pre-commit\patch1719821150-18184')
return code: 128
stdout: (none)
stderr:
error: missing config value GIT_CONFIG_VALUE_0
fatal: unable to parse command-line config
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitstaged_files_only.py", line 29, in _git_apply
cmd_output_b('git', *args)
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitutil.py", line 111, in cmd_output_b
raise CalledProcessError(returncode, cmd, stdout_b, stderr_b)
pre_commit.util.CalledProcessError: command: ('C:\Users\UsrName\AppData\Local\GitHubDesktop\app-3.4.2\resources\app\git\mingw64\bin\git.EXE', 'apply', '--whitespace=nowarn', 'C:\Users\UsrName\.cache\pre-commit\patch1719821150-18184')
return code: 128
stdout: (none)
stderr:
error: missing config value GIT_CONFIG_VALUE_0
fatal: unable to parse command-line config
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commiterror_handler.py", line 73, in error_handler
yield
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitmain.py", line 389, in main
return hook_impl(
^^^^^^^^^^
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitcommandshook_impl.py", line 271, in hook_impl
return retv | run(config, store, ns)
^^^^^^^^^^^^^^^^^^^^^^
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitcommandsrun.py", line 418, in run
with contextlib.ExitStack() as exit_stack:
File "C:UsersUsrNameAppDataLocalProgramsPythonPython311Libcontextlib.py", line 586, in __exit__
raise exc_details[1]
File "C:UsersUsrNameAppDataLocalProgramsPythonPython311Libcontextlib.py", line 571, in __exit__
if cb(*exc_details):
^^^^^^^^^^^^^^^^
File "C:UsersUsrNameAppDataLocalProgramsPythonPython311Libcontextlib.py", line 144, in __exit__
next(self.gen)
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitstaged_files_only.py", line 112, in staged_files_only
with _intent_to_add_cleared(), _unstaged_changes_cleared(patch_dir):
File "C:UsersUsrNameAppDataLocalProgramsPythonPython311Libcontextlib.py", line 144, in __exit__
next(self.gen)
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitstaged_files_only.py", line 96, in _unstaged_changes_cleared
_git_apply(patch_filename)
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitstaged_files_only.py", line 32, in _git_apply
cmd_output_b('git', '-c', 'core.autocrlf=false', *args)
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitutil.py", line 111, in cmd_output_b
raise CalledProcessError(returncode, cmd, stdout_b, stderr_b)
pre_commit.util.CalledProcessError: command: ('C:\Users\UsrName\AppData\Local\GitHubDesktop\app-3.4.2\resources\app\git\mingw64\bin\git.EXE', '-c', 'core.autocrlf=false', 'apply', '--whitespace=nowarn', 'C:\Users\UsrName\.cache\pre-commit\patch1719821150-18184')
return code: 128
stdout: (none)
stderr:
error: missing config value GIT_CONFIG_VALUE_0
fatal: unable to parse command-line config
</code>
Traceback (most recent call last):
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitstaged_files_only.py", line 29, in _git_apply
cmd_output_b('git', *args)
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitutil.py", line 111, in cmd_output_b
raise CalledProcessError(returncode, cmd, stdout_b, stderr_b)
pre_commit.util.CalledProcessError: command: ('C:\Users\UsrName\AppData\Local\GitHubDesktop\app-3.4.2\resources\app\git\mingw64\bin\git.EXE', 'apply', '--whitespace=nowarn', 'C:\Users\UsrName\.cache\pre-commit\patch1719821150-18184')
return code: 128
stdout: (none)
stderr:
error: missing config value GIT_CONFIG_VALUE_0
fatal: unable to parse command-line config
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitstaged_files_only.py", line 86, in _unstaged_changes_cleared
_git_apply(patch_filename)
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitstaged_files_only.py", line 32, in _git_apply
cmd_output_b('git', '-c', 'core.autocrlf=false', *args)
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitutil.py", line 111, in cmd_output_b
raise CalledProcessError(returncode, cmd, stdout_b, stderr_b)
pre_commit.util.CalledProcessError: command: ('C:\Users\UsrName\AppData\Local\GitHubDesktop\app-3.4.2\resources\app\git\mingw64\bin\git.EXE', '-c', 'core.autocrlf=false', 'apply', '--whitespace=nowarn', 'C:\Users\UsrName\.cache\pre-commit\patch1719821150-18184')
return code: 128
stdout: (none)
stderr:
error: missing config value GIT_CONFIG_VALUE_0
fatal: unable to parse command-line config
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitstaged_files_only.py", line 29, in _git_apply
cmd_output_b('git', *args)
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitutil.py", line 111, in cmd_output_b
raise CalledProcessError(returncode, cmd, stdout_b, stderr_b)
pre_commit.util.CalledProcessError: command: ('C:\Users\UsrName\AppData\Local\GitHubDesktop\app-3.4.2\resources\app\git\mingw64\bin\git.EXE', 'apply', '--whitespace=nowarn', 'C:\Users\UsrName\.cache\pre-commit\patch1719821150-18184')
return code: 128
stdout: (none)
stderr:
error: missing config value GIT_CONFIG_VALUE_0
fatal: unable to parse command-line config
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commiterror_handler.py", line 73, in error_handler
yield
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitmain.py", line 389, in main
return hook_impl(
^^^^^^^^^^
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitcommandshook_impl.py", line 271, in hook_impl
return retv | run(config, store, ns)
^^^^^^^^^^^^^^^^^^^^^^
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitcommandsrun.py", line 418, in run
with contextlib.ExitStack() as exit_stack:
File "C:UsersUsrNameAppDataLocalProgramsPythonPython311Libcontextlib.py", line 586, in __exit__
raise exc_details[1]
File "C:UsersUsrNameAppDataLocalProgramsPythonPython311Libcontextlib.py", line 571, in __exit__
if cb(*exc_details):
^^^^^^^^^^^^^^^^
File "C:UsersUsrNameAppDataLocalProgramsPythonPython311Libcontextlib.py", line 144, in __exit__
next(self.gen)
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitstaged_files_only.py", line 112, in staged_files_only
with _intent_to_add_cleared(), _unstaged_changes_cleared(patch_dir):
File "C:UsersUsrNameAppDataLocalProgramsPythonPython311Libcontextlib.py", line 144, in __exit__
next(self.gen)
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitstaged_files_only.py", line 96, in _unstaged_changes_cleared
_git_apply(patch_filename)
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitstaged_files_only.py", line 32, in _git_apply
cmd_output_b('git', '-c', 'core.autocrlf=false', *args)
File "C:UsersUsrNameDokumenteGitHubRepoName.envLibsite-packagespre_commitutil.py", line 111, in cmd_output_b
raise CalledProcessError(returncode, cmd, stdout_b, stderr_b)
pre_commit.util.CalledProcessError: command: ('C:\Users\UsrName\AppData\Local\GitHubDesktop\app-3.4.2\resources\app\git\mingw64\bin\git.EXE', '-c', 'core.autocrlf=false', 'apply', '--whitespace=nowarn', 'C:\Users\UsrName\.cache\pre-commit\patch1719821150-18184')
return code: 128
stdout: (none)
stderr:
error: missing config value GIT_CONFIG_VALUE_0
fatal: unable to parse command-line config