Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting errors when using GitHub for Windows

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?

like image 562
Nict Avatar asked Mar 09 '15 11:03

Nict


People also ask

What are the most common errors in Git?

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.

Why can't I connect to my GitHub account?

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.

What can I do after I install GitHub desktop?

After you install GitHub Desktop, you can configure and customize the app to best suit your needs.

What is the minimum Git version required to interact with GitHub?

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.


1 Answers

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.

Github for windows download here

Help Here

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 be RemoteSigned or Unrestricted). If scripts are not enabled, run PowerShell as Administrator and call Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Confirm.

like image 128
talves Avatar answered Oct 25 '22 15:10

talves