English
Git Bash (Windows) Complete Guide to Configuring macOS-Style Copy and Paste

For Git Bash (MinTTY terminal) on Windows. No plugins required; complete the configuration in 3 minutes and make the copy-paste experience almost as good as macOS.
1. Why change it?
Git Bash uses by default MinTTY As a terminal emulator, its default copy and paste is:
| Operation | Git Bash default keys |
|---|---|
| Copy | Ctrl + Insert |
| paste | Shift + Insert |
macOS user habits Command + C/Command + V, use directly Ctrl + C will trigger the terminal interrupt signal (SIGINT),Cannot be simply mapped to copying..
So, is there an elegant alternative? Yes—Mouse operation.
II. Recommended Solution: Mouse Replaces Keyboard
The solution closest to the macOS trackpad experience:
Mouse drag to select text Auto copy
Right mouse button Paste directly
No need to press any keyboard, efficiency is even higher than Ctrl+C / Ctrl+V.
III. Configuration Steps (Illustrated)
1. Open Options
In the Git Bash window:
Right-click the window title bar, or click the icon in the upper left corner;
选择 Options....
2. Set mouse behavior
Enter the left side Mouse Tab, settings as follows:
| Options | Recommended value |
|---|---|
| Right mouse button | Paste |
| Middle mouse button | Paste |
| Default click target | Application |
| Modifier for overriding default | Shift |
Namely:Right-click = paste, middle-click = paste.
3. Enable "Copy on Select"
Enter the left side Selection tab, in Clipboard Region selection:
Copy on select(Core: copy on selection)
Copy with TABs
Clear selection on input
💡 Different versions of Git Bash have slightly different option layouts:
Newer version:Copy on select Located at
SelectionTab;Old version: may be in
MouseIn the tab, calledCopy on selectorPaste on right click.
If you cannot find it, please refer to the interface of your current version; the logic is consistent.
4. Save and apply
Click Apply→Save, configuration Effective immediately, no need to restart Git Bash.
IV. Usage Effects
| Operation | Effect |
|---|---|
| Select text by dragging the mouse | Automatically copy to clipboard |
| Right-click | Paste directly |
| Middle mouse button click | Paste directly (optional) |
keyboard Ctrl + C | Retain the original terminal interrupt functionality. |
keyboard Ctrl + Insert | Copy (keep default) |
keyboard Shift + Insert | Paste (keep default) |
Core Advantages: while retaining the terminal Ctrl+C Interrupt signal, while also achieving a smooth macOS-style copy-and-paste experience.
V. Frequently Asked Questions
Q1: Why can't it be directly changed to Ctrl+C Copy,Ctrl+V Paste? A: MinTTY does not support keyboard shortcut remapping.Ctrl+C In the terminal, it is the interrupt signal (SIGINT); forcibly changing it would break the command interrupt function, and MinTTY officially does not provide a way to modify it.
Q2: Can it be implemented by modifying the configuration file (.minttyrc)? A:不能。.minttyrc There are no shortcut key mapping options; only appearance, font, mouse behavior, etc. can be configured.
Q3: insist on Ctrl+C / Ctrl+V What should I do? A: Abandon MinTTY, switch to Windows Terminal or VS Code built-in terminal, they support true keyboard shortcut customization and can intelligently distinguish between “copy” and “interrupt”:
There is selected text. Press
Ctrl+CCopyNo text selected Press
Ctrl+CInterrupt signal
This is completely consistent with the behavior of Terminal / iTerm2 on macOS.
Q4: What should I do if my interface is different from the tutorial? A: The option names and locations for MinTTY differ slightly across different Git for Windows versions:
“Copy on select” may be
MouseorSelectionTab;“Paste on right click” has been split into in the new version.
Mouse → Click actions → Right mouse button = Paste.
Just find the corresponding option logically; their functions are essentially the same.
VI. Conclusion
| Requirements | Recommended practice |
|---|---|
| Want macOS-style smooth copy and paste | Solution in this article: select to copy + right-click to paste |
Keep using the keyboard Ctrl+C / Ctrl+V | Switch to Windows Terminal or the built-in terminal in VS Code |
| Want to preserve the terminal interrupt signal | Maintain Ctrl+C Leave it as is |
📌One sentence: Git Bash's MinTTY does not support key remapping, but enabling Select to copy + right-click to paste After that, the mouse experience completely beats the native macOS terminal, and it’s worth a try.
Configuration path mnemonic: Git Bash 标题栏右键 → Options → Mouse(右键=Paste)→ Selection(Copy on select)→ Apply → Save