17

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?

2
  • You probably also see it on laptops when you dock/undock between home/work when the screen resolutions and/or monitor-one/two/three move around...
    – Gregor y
    Mar 23, 2021 at 16:32
  • This also shows up when you launch git gui on a unc share, which can cause overly positive values as well
    – Gregor y
    Feb 20 at 19:25

6 Answers 6

24

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)


Update: January 22, 2021

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.


Update: April 20, 2021

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: $_"}}
5
  • 1
    Thanks! :) I had to use "maximize" in order to get it back.
    – Rene
    Oct 13, 2020 at 14:37
  • Thanks! The Update: January 22, 2021 resolved my issue
    – Corri
    Apr 12, 2021 at 15:17
  • The update about gui.geometry resolved my problem! I removed the line from .git/config in the repository where the window did not show and then I could use git gui again.
    – kaah
    Aug 17, 2021 at 5:50
  • git config gui.geometry '900x500+100+50 300 250' did the trick
    – guest
    Dec 10, 2022 at 22:10
  • active git-gui window(ALT+TAB) + press and release ALT + press and release Space + Click Maximize Aug 22 at 6:27
9
  1. Click on Git GUI's task-bar icon to activate.
  2. Press and release Alt.
  3. Press and release Space-bar.
  4. Select "Move" option in the context menu.
  5. Press Left or Right keyboard's arrow keys to move invisible window back to screen.
1
  • 3
    It worked for me: 1. Click on Git GUI's task-bar icon to activate. 2. Press and release Alt. 3. Press and release Space-bar. 4. Maximize Thanks for the suggestion
    – Falcoa
    Nov 3, 2021 at 20:45
5

I have faced a similar problem under Windows 10.

The command git gui did not start the tool... but a weird Tcl-Tk window appeared in the taskbar.

To solve, I just submitted the following command in order to unset (= to reset) the git gui settings of my repository :

git config --remove-section gui

( the local config file that contains the git repository's settings is myrepository/.git/config )

Then I restarted Git GUI ( git gui ) and it was visible again. The following lines were added automatically into the local config file :

[gui]
    wmstate = normal
    geometry = 893x435+234+234 175 196
0

So the options from the task-bar (cascade, windows side by side, and stacked) did not work for me. I had to go to the taskbar, identify the app, right-click and select Maximise.

1
0

This happen to me when change to an environment with different monitors. To solve it, right click on desktop empty space, select "Display settings", some rectangle represent monitors show in "Rearrange your displays". Move any one to different place (change their order) and apply, the disappeared window is moved to one of the screen.

Then do it again to put the monitors to correct position.

This method works for any other applications, not only Git-GUI.

0

I also came across with this nasty issue for some (local) git repos (on git-gui/MINGW64).. This works for me:

  1. cd dirWhereLocalRepoExist
  2. check if there gui.geometry option exists: $ git config --list
  3. If true: $ git config --unset gui.geometry #remove the option from --local config
  4. $ git gui #hopefully the Git GUI window will show up..

Cheers!

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.