I suddenly got errors when I was using git last week, for no apparent reason. I only have access to a windows PC.
The errors I\'m getting doesn\'t seem to give me an
Sorry I don't have the rep to comment yet, but, are you sure you have the latest version of "GitHub for Windows"? I have had problems before when it didn't auto-update.
Also, do you usually use the "Git Shell" that comes with it? This is what I usually do, so I didn't have any problems with losing configurations when I re-installed, not sure what happens if you use the main GUI program...
Once you start your Powershell command window, run git --version
. Github for windows installs msysGit
GitHub for Windows includes a fully functional version of msysGit — no need to install anything extra. You can pull up a PowerShell console within the context of any repository.
There is some information on the uninstall github for windows page about removing left over files.
Github for windows uses posh-git for git to be used by powershell.
Verify execution of scripts is allowed with
Get-ExecutionPolicy
(should beRemoteSigned
orUnrestricted
). If scripts are not enabled, run PowerShell as Administrator and callSet-ExecutionPolicy RemoteSigned -Scope CurrentUser -Confirm
.
I encountered the same problem on my laptop and I spent a lot of time to understand and to solve it. Here is my experience.
The git error message (Couldn't open /dev/null (or dup failed) : No such file or directory) is a linux/unix one. In fact, what git is trying to say is that it cannot access to the null device of your system. In windows, there is a actually a null device that corresponds to an empty and invisible file, present in each folder.
Here you can open a window console (cmd) and type the command echo sample > nul. If you get an error message, you actually have a problem with your null device.
Identifying the problem :
If it exists but is in warning, try this (source) :
If it doesn't exist (or the step 3 doesn't repair the problem and after removing the Null device) :