How to create a new GitHub repo for a WordPress plugin in Visual Studio Code?

To create a new GitHub repo for a WordPress plugin with Visual Studio Code, you can follow these steps:

  1. Create a new folder on your computer where you want to store your plugin files.
  2. Open Visual Studio Code and go to the File menu, then select Open Folder and navigate to the folder you just created.
  3. In Visual Studio Code, go to the View menu, then select Command Palette (or press Ctrl+Shift+P on Windows or Cmd+Shift+P on Mac).
  4. Type “Git: Initialize Repository” and select it from the list of options. This will create a new Git repository in your folder.
  5. Go to the GitHub website and log in to your account.
  6. Click the “New” button to create a new repository.
  7. Give your repository a name and description, then select “Public” or “Private” depending on your needs.
  8. Click the “Create repository” button.
  9. Go back to Visual Studio Code and open the terminal by going to the Terminal menu and selecting New Terminal.
  10. Type “git remote add origin [your repository URL]” in the terminal, replacing [your repository URL] with the URL of your new GitHub repository.
  11. Type “git add .” in the terminal to stage all the files in your repository.
  12. Type “git commit -m ‘Initial commit'” in the terminal to commit your changes.
  13. Type “git push -u origin master” in the terminal to push your changes to GitHub.

Your new GitHub repository for your WordPress plugin is now set up and ready for use with Visual Studio Code.