cancel
Showing results for 
Search instead for 
Did you mean: 

I installed Git, then I am trying to check the git version on VSCode, but it's giving me error.

I installed Git, then I am trying to check the git version on VSCode, but it's giving me error.

I use the git --version to run the command on VSCode but its showing error, please how can I check the version?

Tags (1)
5 REPLIES 5
Jimmy Seddon
Community Champion

Re: I installed Git, then I am trying to check the git ve...

Message contains an image

Hi @Esther Anyanwu,

Welcome to the Community!

I would try first running the command outside the context of VSCode.  I would recommend opening up a terminal session, or on Windows use either a Command prompt or PowerShell.

Run the same command again and you should get a response that looks like this:

GitVersion.PNG

Could you also provide the error you are getting if that doesn't work as that will help in getting to the root of your issue.

I hope that helps!

-Jimmy

Re: Re: I installed Git, then I am trying to check the gi...

Thank you for your response, I used a command prompt to run it now, this is the response I am getting  'git' is not recognized as an internal or external command,
operable program or batch file. Please what next am I to do?

Jimmy Seddon
Community Champion

Re: Re: I installed Git, then I am trying to check the gi...

Ahh!  That sounds like you don't have the location of Git registered in your PATH environment variable properly.

If you press the windows key and start searching for "environment" then click on the "Edit the system environment variables" option that comes up.

You will be taken to a dialog box with an Environment Variables button on it, click that.

In the new window, under system variables, locate the "Path" variable, select it and click the edit button.

In the new popup window you will want to click the new button to add a new entry, and then you are going to want to add the location you installed git to.  By default, it it's going to be something like: "C:\Program Files\Git\cmd"

Once done, click OK on everything to exit and you should be all set to go.

I hope that helps!

-Jimmy

Re: Re: I installed Git, then I am trying to check the gi...

Wow, the last solution you gave to me worked, I am so happy. Thank you so much, I appreciate you, God bless you.

Jimmy Seddon
Community Champion

Re: Re: I installed Git, then I am trying to check the gi...

Awesome! always happy to help!