On 25 August 2013 15:13, <
robert.sim...@gmail.com> wrote:
> Thanks for your reply. But...
>
> The repo isn't listed in .gitconfig. At least the one in C:\Users\<user
> name>\.gitconfig, assuming I have the right location. The error said it was
> looking for that file in U:\.gitconfig.
In this case you have got HOME or USERPROFILE set to point to U:\. The
global .gitconfig file is going to be read every time you run a git
command and if HOME has been set to U:\ it will try to read this file
and others from this non-existent directory path.
>
> The explorer context menu seems not to be present. I chose the 'advanced'
> context menu during intall. I confess I didn't try to start git-gui from the
> command prompt.
Given you now mention that it is looking for .gitconfig - it won't
matter where you start git gui from. All instances of git commands are
going to suffer.
> I've just triggered the problem again by deleting the network drive mapping.
> Here's what I get when I try to open the repository:
>
> error: could not lock config file U:\/.gitconfig: No such file or directory
Setting HOME explictly will avoid the issue by overriding the
directory in which we will search for the global git configuration
files (.gitconfig, .gitignore and .gitattributes I think). This is
normally configured from %USERPROFILE% or %HOMEDRIVE%%HOMEPATH% in Git
for Windows but if HOME has been set then this is used instead.
Note that all git commands -- not just git-gui will try reading the
$HOME/.gitconfig file.