0

I have managed to create a working directory and staged the files successfully and now I wanted to move them to commits. In the terminal in VS code I have opened the folder and type git commit and it returns the following:

/Users/lenabeltramin/Desktop/LenasSkillshareProject(HEAD) 21:12:55 
$ git commit
hint: Waiting for your editor to close the file... code --wait: code: command not found
error: There was a problem with the editor 'code --wait'.
Please supply the message using either -m or -F option.

How do I solve this so I can commit the files? Anyone who can guide me through this? I've been challenged to push something to GitHub for the first time and I'm a total rookie but trying my best to learn.

Code-Apprentice
  • 69,701
  • 17
  • 115
  • 226
  • Does this answer your question? [How to use Visual Studio Code as Default Editor for Git](https://stackoverflow.com/questions/30024353/how-to-use-visual-studio-code-as-default-editor-for-git) – phd Dec 19 '19 at 21:50
  • https://stackoverflow.com/search?q=%5Bgit%5D+vs+code+editor – phd Dec 19 '19 at 21:50
  • It looks like `code` is not in your PATH. – Code-Apprentice Dec 19 '19 at 22:23

1 Answers1

0

Make sure you saved all files + the VS is not linked to the program (app is not running), then do:

git commit -m 'YourTitle'

where Title is your description of the commit.

Khalil Khalaf
  • 8,448
  • 7
  • 47
  • 92