project manager: "remove version control" is dangerous
Description
Right-clicking a file in the project manager, choosing "version control", and selecting "remove version control", pops up the dialog asking "Are you sure you want to remove Git tracking from this project?"
me: ah yea, git is a little slow on this project so having kicad not try to execute git commands all the time could be nice. click
kicad proceeds to delete the .git directory.
There's several things wrong with this.
- The dialog does not at all convey that kicad is about to literally delete the entire .git directory. I interpreted it to mean that it would disable git operations, maybe with a tag in the .kicad_pro to keep that option sticky. I initially thought the menu item was going to add the file to .gitignore, but the confirmation dialog at least mentioned it was project-wide.
- Kicad shouldn't assume that this project is the only thing tracked by the git repo. It's quite possible to have multiple projects in a single git repo, and one project's choices shouldn't impact the others.
- Kicad shouldn't even offer to delete the git repo unless it was the one that created it.
- The warning at a minimum needs to convey that branches will be permanently lost. In my case, I had everything pushed to a server, but some valid usages of git do not mirror anywhere, and deleting .git would be significant data loss.
- Such a destructive operation really shouldn't be in a context menu for a random file in the tree, in my opinion. It should be buried in project settings or something.
- Maybe the function should rename the .git instead of straight-out deleting it? The option for individual files is "move to trash", so why is removing git so nuclear?
- "yes" should probably not be the default option (keyboard). Usually for these kinds of dialogs the wording would be phrased such that "ok/cancel" would be appropriate.
Steps to reproduce
- Right-click on a file, go to version control, and choose "remove version control"
KiCad Version
Application: KiCad x86_64 on x86_64
Version: 9.99.0-3866-gde628979c0, release build
Libraries:
wxWidgets 3.2.4
FreeType 2.11.1
HarfBuzz 2.7.4
FontConfig 2.13.1
libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.19
Platform: Ubuntu 22.04.5 LTS, 64 bit, Little endian, wxGTK, X11, xubuntu, x11
Build Info:
Date: Oct 25 2025 22:45:53
wxWidgets: 3.2.4 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.74.0
OCC: 7.6.3
Curl: 7.81.0
ngspice: 43
Compiler: Clang 20.1.8 with C++ ABI 1002
KICAD_IPC_API=ON
KICAD_USE_PCH=OFF
Locale:
Lang: en_US
Enc: UTF-8
Num: 1,234.5
Encoded кΩ丈: D0BACEA9E4B888 (sys), D0BACEA9E4B888 (utf8)