I have git bash in WIN 10. Since last week suddenly every command (ls, cd, git, ...) runs very slow, even ctrl-c. After type a command it pauses, and then shows result, before command completes, it pauses another while. I remembered last week there was a 3D Graphics GPU something in notification corner during that time. I checked that I don't have GPU in this PC, and it is GeForce 630 with a 2017 driver. (heard that AMD driver can cause such problem).
Git Bash is slow in normal mode, most probably caused by 3rd-party software or drivers, so it is worth trying to see if it works better in Safe Mode.
Boot into Safe Mode to see if Git Bash runs smoothly.
git config
Run the following in Git Bash (on newer version ):
git config --global core.preloadindex true
git config --global core.fscache true
git config --global gc.auto 256
Citation accessible from git help config
(opens up a documentation page in your default browser)
core.preloadIndex Enable parallel index preload for operations like git diff This can speed up operations like git diff and git status, especially on filesystems like NFS that have weak caching semantics and thus relatively high IO latencies. When enabled, Git will do the index comparison to the filesystem data in parallel, allowing overlapping IO’s. Defaults to true.
core.fscache Enable additional caching of file system data for some operations. Git for Windows uses this to bulk-read and cache lstat data of entire directories (instead of doing lstat file by file).
gc.auto When there are approximately more than this many loose objects in the repository, git gc --auto will pack them. Some Porcelain commands use this command to perform a light-weight garbage collection from time to time. The default value is 6700. Setting this to 0 disables not only automatic packing based on the number of loose objects, but also any other heuristic git gc --auto will otherwise use to determine if there’s work to do, such as gc.autoPackLimit.
In a nutshell:
core.preloadindex
: enables faster parallel file operationscore.fscache
: avoids UAC permission delays (running git as admin)gc.auto 256
: more frequent garbage collection to reduce object bloat (default is 6700)Verify that settings are set by running:
git config --list
You should see:
core.preloadindex=true
core.fscache=true
gc.auto=256
Complex shell prompts that show Git status can slow down the terminal.
🔧 Edit your ~/.bashrc
or ~/.bash_profile
:
export PS1='\u@\h:\w\$ '
📖 More tips:
msconfig
, hit Enter➡️ If Git Bash works now:
Many AV tools slow down Git Bash by scanning each command execution.
Add exclusions for files within C:\Program Files\Git\bin\
folder:
git.exe
ssh.exe
mintty.exe
conhost.exe
Settings
Privacy & Security
→ Windows Security
→ Virus & threat protection
Manage Settings
→ Scroll down to Exclusions.exe
files listed above%USERPROFILE%\.gitconfig
, %ProgramFiles%\Git
Choose the minimal/default settings and avoid extra PATH/global overrides if unsure.
Files that start with the .
(dot), might not be visible
File Explorer
File Explorer
click arrow ⬇️ (down to expand the menu) or Windows 11 it three vertical dots.Options
View
Files and Folders
, find Hidden files and folders
Show hidden files, folders, and drives
Now, you should see any hidden files or folders.
If the issue persists:
Windows Logs → Application
git.exe
, bash.exe
, mintty.exe
These logs may reveal:
Then, try checking Windows logs: - Application logs - records events related to the Windows system components, such as drivers and built-in interface elements; - System logs - record events related to programs installed on the system.
You must be looking at the column Level (Error
) after trying to run the commands (that freeze your git bash). Look at the date and time column to check the most recent one.
Then by going to eventvwr
you may see some new warning/error (most probably that hangs up your console)
See the Event viewer
error example (you could use the error message and Event ID to Google the problem):
If you saw a "3D GPU" notification recently:
See How to Stop Windows 10 Apps From Launching at Startup
control panel
➡️ programs and features
- try uninstalling it, after which you may have noticed this behavior.
If none of the above helps:
bash.exe
Restore point
if you have anySee Recovery options in Windows
By going to the Windows 10 website and downloading the tool in the Create Windows 10 installation media
section.