Reputation: 159
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":
Upvotes: 15
Views: 49592
Reputation: 564
After installing Git you need to set your name and email address so git can set the author of a commit.
git config --global user.name "John Doe"
git config --global user.email [email protected]
If you want to configure them for just that one repo, leave out the --global
flag
Rel: https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration
Upvotes: 0
Reputation: 1752
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
Upvotes: 1