Git GUI for Windows' window is Missing and/or Invisible - windows

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?

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: $_"}}

Click on Git GUI's task-bar icon to activate.
Press and release Alt.
Press and release Space-bar.
Select "Move" option in the context menu.
Press Left or Right keyboard's arrow keys to move invisible window back to screen.

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

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.

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.

I also came across with this nasty issue for some (local) git repos (on git-gui/MINGW64).. This works for me:
cd dirWhereLocalRepoExist
check if there gui.geometry option exists: $ git config --list
If true: $ git config --unset gui.geometry #remove the option from --local config
$ git gui #hopefully the Git GUI window will show up..
Cheers!

Related

TortoiseGit - where is the reset option for a branch?

I am using TortoiseGit 64 bit version on Windows 10. I know it has a reset option because the documentation talks about it. However, I cannot find the menu option for "Reset". I have searched the preferences to see if it needed to be added but I cannot find it anywhere. Here is a screen capture of my TortoiseGit menu.
Right now, the reset dialog can only be opened using the log dialog context menu.
cf. https://tortoisegit.org/docs/tortoisegit/tgit-dug-showlog.html
To add onto MrTux,
Go to the log dialog, right click on the commit you want to revert to and there should be a 'reset "current branch" to this' popup. If you want to clear all local changes in favor for this commit, then perform a Hard reset.
I had the same problem but couldn't figure it out from the answer here.
But the way I did it was, after I did a fetch there was the option to do a reset in the dropdown in the bottom corner of the dialog

Is there a better way to see which Git branch I am on in the XCode 7 Interface?

I'd like to be able to see which Git branch I am currently working on at a glance in the XCode 7 (beta 5) interface without going through the menu system. Is this possible? I want to see the equivalent of running git branch from the command line which adds a star next to the current branch.
There are other questions which ask the question for earlier versions of XCode and I'd like to know if anything has changed or if anyone has any cleaver workarounds / solutions.
The only place I can see it is in the Source Control Menu after the project name:
Its also in the File Inspector in the Source Control Section which I can quickly show/hide using keyboard shortcuts but it would be nicer if I could see it as it is displayed in the Version Editor but without having to switch to the version editor:
Hi Codecowboy yes in Xcode 12.3 if you click on the so-called source code navigator (blue) x in the left menu panel header icon bar you should see the name of the project and the associated branch :-)

P4Merge forgets my comparison method preference. How do I set a default value?

When running P4Merge, the comparison method is always initially set to 'Recognize line ending and white space differences' (aka all changes). I want to use 'Ignore line ending and white space length differences', but I have to manually re-set this every time the tool runs.
I have changed the setting:
with the toolbar button
in the preferences dialog
on the File menu
and it never sticks. In fact, the preferences dialog entry is reset every time I go back to the menu, without even closing the program. I have changed the setting before using the Exit command from the File menu and before closing the window, and also before saving a merge.
In the past I was able to save my setting and have it be remembered, unfortunately I don't have any recollection of the software version involved. I was using P4Merge as standalone and none of the rest of the Perforce suite was installed.
I can update with any other supporting information that might prove relevant.
[Edit: It's the radio button setting in the preferences dialog that ignores changes and resets every time it's viewed, not the File submenu.]
If you are in Unix/Linux, I would blow away the .p4merge directory in your home directory, which stores all your preferences. In Windows, I'm sure there is a similar directory in your home folder. Sometimes things can get out of sorts in that directory, and cleaning it out could help. After doing so, try saving your preferences again (do it via Edit -> Preferences to change the defaults) and restarting p4merge.
If that doesn't work, it could be a buggy version.
It looks like this issue was fixed in 2013.3. I ran into this issue, updated to the latest version of P4, and the problem was resolved.

How to mouse scroll with Git Bash?

Using Git Bash or MinGW Shell, if I put in a command with much output,
for example env, I cannot mouse scroll. A regular old Command Prompt (cmd.exe) window will do this however.
Enable Quick Edit mode
Open Properties: AltSpace, then P (for properties)
Under Options tab > Edit Options > Check Quick Edit > Hit OK
Now you will be able to scroll with mouse.
In the latest version of the git bash you don't have any property such as Quick Edit but then too your scroll might not work as it was my case..
press alt + space then click options and go to window then
Simply change your scrollbar location from right to left or vice versa then it will work, at least worked for me.

How do I do "svn st" in AnkhSVN for Visual Studio? -no text-

Just installed AnkhSVN and I see the equivalent of "svn up" but I'd prefer to run "svn st" first so that I don't just blindly update.
The next release of AnkhSVN will enable the 'Recent Changes' tab in the pending changes window. This allows the equivalent of 'svn st -u' (It shows outgoing and incoming changes).
We are still working on the usability of this view in the
daily builds.
Input welcome on the AnkhSVN users list.
There's a pending changes window you can add that will show what files you have changed in your local working copy. I usually keep it in the set of docked windows where the output window is. In general, you can also tell what status a file is in by the icon next to the file. For example, a plus sign means that it's been added.
UPDATE: Here's a guide to the icon overlays. They should be about the same as in Tortoise SVN.

Resources