From AppVeyor and my Windows VM, I gather that user's .gitconfig and .gitignore are typically not in what R regards as user's home directory. On my VM:
Home directory is C:/Users/USER/Documents but user's git dot files are one level up, in C:/Users/USER. I see the same on AppVeyor. I have accepted default git setup everywhere.
edit_git_config("user") and edit_git_ignore("user") should be adjusted accordingly, for Windows. Currently they seek/put these files in the home directory. This new config file then seems to mask the pre-existing one, causing, e.g., user.name and user.email to be appear to be unset.
The text was updated successfully, but these errors were encountered:
jennybc
changed the title
Location of user-level git files on Windows
Location of user-level git dotfiles on Windows
Dec 31, 2017
This is the tricky one. When using the Windows command shell, batch scripts or Windows programs, the file will be read from %USERPROFILE%\.gitconfig
However, when you're using msys (bash) this will be read from $HOME/.gitconfig
Yet another different location can be found from within Emacs (for instance by using magit) when Emacs is started from a Windows command shell. Emacs sets the HOME variable as %APPDATA% , which means that .gitconfig will reside in %APPDATA%\.gitconfig
Handy way to check location of global gitignore, if you have access to command line git:
From AppVeyor and my Windows VM, I gather that user's
.gitconfigand.gitignoreare typically not in what R regards as user's home directory. On my VM:Home directory is
C:/Users/USER/Documentsbut user's git dot files are one level up, inC:/Users/USER. I see the same on AppVeyor. I have accepted default git setup everywhere.edit_git_config("user")andedit_git_ignore("user")should be adjusted accordingly, for Windows. Currently they seek/put these files in the home directory. This new config file then seems to mask the pre-existing one, causing, e.g.,user.nameanduser.emailto be appear to be unset.The text was updated successfully, but these errors were encountered: