-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Feature description
The Good
When you open a repository in Git Extensions on Windows, a .gitext
file will be written in %appdata%\GitExtensions\GitExtensions\Recent
. The contents of this file is a single line of text, representing the path of the opened repository. This .gitext
file will then show up under "Recent" when right-clicking the app's icon, and you can pin repos that way:
I like to open my pinned/favorite repositories this way - I also apply this to directories in Explorer, solutions in Visual Studio, files in Word, and so on.
The Bad
These files however will only take the name of the rightmost directory of the path. So if you first open the repository at C:\Dev\Foo\Bar
and then later C:\Dev\TotallyOtherRepo\Bar
, the Bar.gitext
file in the Recent
directory will be updated with the latter path.
This means the path the pinned file points to will change, and reopening the pinned repository will open a different repository than pinned.
The Ugly
This is especially confusing with submodules. I have:
- A library I'm developing under
C:\Dev\MyLib
- An application I'm developing under
C:\Dev\MyApp
- With a submodule to the former, under
C:\Dev\MyApp\lib\MyLib
- With a submodule to the former, under
And every time I open the submodule from within MyApp
, the MyLib.gitext
file will change to the latter path, and my pinned MyLib
repo will open the repository in the submodule, instead of the "root" version at C:\Dev\MyLib
. This is confusing and has caused me multiple times to start working in the wrong directory.
The Requests
I see multiple solutions:
- Me paying more attention to which directory I'm in, but that won't fix pinning.
- Me copying the
.gitext
file, renaming it (for example toMyLib-root
orMyLib-lib
) to prevent it from being overwritten, pinning that one. (This is my current workflow.) - Git Extensions not overwriting
.gitext
files when opening submodules. - Git Extensions not overwriting
.gitext
files whose path still exists, but instead adding a new recent file with an earlier part of the path (lib-MyLib
,MyApp-lib-MyLib
,MyOtherApp-lib-MyLib
), or add a suffix (MyLib (2)
). - Create subdirectories within the Recent directory, like
Recent\C\Dev\MyLib.gitext
. - A combination of the above.
Environment
- Git Extensions 4.0.2.16100
- Build 25100ec
- Git 2.39.1.windows.1
- Microsoft Windows NT 10.0.22621.0
- .NET 6.0.15
- DPI 96dpi (no scaling)
- Microsoft.WindowsDesktop.App Versions
Microsoft.WindowsDesktop.App 6.0.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]