aeroegnr
aeroegnr

Reputation: 59

Git appears to have hijacked my windows command prompt

I installed Git for windows 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?

Upvotes: 0

Views: 735

Answers (3)

John Stoneham
John Stoneham

Reputation: 2483

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.

Upvotes: 0

Joshua
Joshua

Reputation: 43280

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

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

Upvotes: 0

Jords
Jords

Reputation: 1875

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

Upvotes: 3

Related Questions