Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Git: Failed to execute git" in Visual Studio Code

I'm following a tutorial to create a remote Git repository, clone it locally, add a README.md file and then save and commit locally then push remotely.

I have followed word for word a few times but when I get to "commit staged changes" every time it says:

Git: Failed to execute git

This is all using Visual Studio Code.

I'm not sure where to go from here and have no idea how to fix this.

This is just after I've pressed "commit":

Just after I've pressed commit

like image 351
Sean Emery Avatar asked Nov 07 '22 04:11

Sean Emery


1 Answers

You need to initialize a Git repo for your project. To do this:

Inside of your Visual Studio Code Project, press Ctrl + `.

A terminal window will show up!

Enter: git init

like image 176
Dawit Abraham Avatar answered Nov 13 '22 22:11

Dawit Abraham