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 any clear answers as to what went wrong, how, and what I need to do to fix it.
The error happened right after I cloned an empty repository, and I've been uninstalling and reinstalling GitHub for Windows ever since, I usually only use the Git Shell that comes installed with, but the GUI is also having problems doing anything beyond starting up.
The error in it's entirety:
WARNING: posh-git requires Git 1.7.2 or better. You have .
Couldn't open /dev/null: No such file or directory
Couldn't open /dev/null: No such file or directory
Every time I run a git
command it gives me Couldn't open /dev/null: No such file or directory
.
What I find weird is that it's looking for /dev/null, but considering I'm running on Windows /dev/null would never exist at all.
Does anyone know a workaround for this?
This is one of the most common errors, especially for newcomers to Git. Let’s suppose that you want to run git status in a particular directory: The error indicates that the command cannot be executed because the current directory is not a Git directory. Usually, there are two main reasons why you might be getting the error.
If you try to connect with your GitHub username, it will fail: $ ssh -T [email protected] > Permission denied (publickey). If your connection failed and you're using a remote URL with your GitHub username, you can change the remote URL to use the "git" user.
After you install GitHub Desktop, you can configure and customize the app to best suit your needs.
There's no minimum Git version necessary to interact with GitHub, but we've found version 1.7.10 to be a comfortable stable version that's available on many platforms. You can always download the latest version on the Git website. The repository you're trying to fetch must exist on GitHub.com, and the URL is case-sensitive.
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With