Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
895 views
in Technique[技术] by (71.8m points)

git - 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...