How to Create and Add Code to a New Github Repository
- Create a new repository in Github by clicking the plus sign in the top right corner of your Github page and clicking “New repository” from the dropdown menu. This will bring you to a new page where you can specify a name for the new repository, write a description, and add additional information and content, like a Read Me.
2. Now that you have a repository go to your terminal and change the current directory to your project.
3. Initialize your directory as a Git repository by running the following code in your terminal. This initializes the repository with main as the default branch.
git init -b main
4. Add the files in new local repository and stage them to be committed by running the following code in your terminal.
git add .
5. Commit the files you just staged by running the following code in your terminal.
git commit -m "Your commit message"
6. In your terminal run the following code. The remote URL is the URL for the Github repository for this project. You can get this link by clicking the “Code” button…