开发者

Git appears to have hijacked my windows command prompt

I installed Git for windo开发者_如何学运维ws XP, and for some reason I couldn't get it to work. It threw and error code that showed it was looking for a network drive (drive Z:\ instead of the local drive C:). I got tired of fooling with it and decided to try the bash that came with GIT. Well, I got into the command prompt and saw the following:

Z:\[my name]>

I tried

Z:\[My name]>cd C:\

and all I got was a return back to the same prompt. It didn't actually switch directories. So, I tried

Z:\[My name]>cd D:\

which failed because the D drive does not exist. But, trying to switch to the C drive doesn't throw an error, it just doesn't do anything. I can't access my c drive via the command prompt any more at all.

A little bit confused, I uninstalled Git. Now, after rebooting, I still cannot access the C drive through the command prompt, and it defaults to the Z drive instead.

How do I fix this?


IIRC, try typing C: (ie no command, just the drive letter to switch to)


Sounds like something stepped in and changed your home directory settings. Type echo %USERPROFILE% and you'll probably see your Z: drive set. Check your Environment Variables settings to change it back if you need.


Z:\[MyName]>PROMPT $p$g

Probably wrong but it is the solution to the literal interpretation of hijacked my prompt.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜