Git Assessment - Error when git init

I’m having issues with git init to start a repo for a directory. When I enter command git init, I get the below error. I attended one of the zoom lectures and asked the presenter, but they didn’t know what it was. I believe I downloaded git correctly. I’m also using windows 10 which I’ve heard has some issues with Ubuntu. Please help

PS C:\Users\Josh\Desktop\git-repo-management> git init

git : The term ‘git’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • git init
  •   + CategoryInfo          : ObjectNotFound: (git:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException

Hi Josh,
Unfortunately, I’m not super familiar with Windows and I’ve never run into this issue myself.

However, I did a google search with your error message and found that this is a fairly common issue that might have to do with where git was installed on your machine (a path issue).

I found this post on Stack Overflow that describes a similar problem, with a number of people weighing in about different possible solutions. I’d recommend taking a look there.

If git commands seem to work from the command line, but just not in VSCode, this post might help you out.

I’m also hoping some other Windows / Ubuntu users will weigh in with any ideas!

Take a look, and keep us updated on your progress.
Jesse

Thanks for the links. I figured out what the issue was. Since I have windows when I downloaded git following the instructions on App/Academy, it downloaded git for Linux on my Ubuntu terminal but my windows wasn’t seeing it. I had to download git again for windows and it worked after that.

1 Like

Excellent - glad to hear it worked out.
Let us know if anything else comes up as you tackle the prep work.
Jesse