The basic GUI that comes with the install of git: https://git-scm.com/download/win; was working fine in Windows 10 until one day I used it on desktop 3, and then I must have switched desktops and closed it or something because now when I launch the GUI it appears to open just fine but there's no active window on any desktop. The icon shows up on the task-bar and when I hover over it, it does show a perfectly fine preview of the running GUI, but when I click on it it doesn't go anywhere.
How can I get the window back?
Windows and Linux Users To run gitk, type gitk in your command line or terminal. To run git-gui, type git gui instead.
In order to clone a repository, click on the "Clone Existing Repository" link in the Git GUI window. An existing repository is one that is already initialized and/or has commits pushed to it. In the Source Location field, fill in the Git remote repository location.
So apparently the window does exist and no it's not invisible; it has just wandered off the screen.
There's a couple ways to solve this: You can simply, right-click the task bar and choose any of the options: Cascade windows, Show windows stacked, or Show windows side by side.
However I prefer not to have all my windows resized just to get at that lost sheep, and so I click on Git GUI's task-bar icon to make it active then press and release alt, then pres and release space-bar, then use the arrow keys to move it back on screen(to the right in my particular case).
(Yes right click task-bar+U uncascades, but then I found myself back where I started)
So I was poking around in the git config and it looks like under the local settings there's an entry called gui.geometry
. After playing with this value for a few minutes it looks like it has the following format:
(width)x(height)+(left)+(top) (split_modified) (split_staged)
where all of the tags above are in pixels, and yes negative values of (left)
move it off screen.
So to reset the gui for that repo (and if you've got the git PowerShell stuff installed) you can: close the gui, go to the folder, open up a PowerShell prompt there, give the command:
git config gui.geometry '900x500+100+50 300 250'
then reopen the gui, which that should at least move it back on screen where you can drag it back to where you want it.
also if you just want to fix the left position you could see the current value with
git config gui.geometry
then just change the negative values you have for +100 or +50 to move it back on screen.
End on a one-liner?
git config --get-all gui.recentrepo | %{try{pushd $_;$geo=git config gui.geometry;git config gui.geometry ($geo -replace'^(.*?)\+.*?(\s.*)$','$1+50+50$2');write-host "Updating repo: $_`n Found Geo: $geo";popd}catch {write-warning "Skipped: $_"}}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With