Steps to Create a Github Repo Using Git Bash
To create a new GitHub repository using Git Bash, you can use the following steps:
- Open Git Bash on your computer.
- Change the current working directory to the location where you want to create the repository.
- Run the following command to initialize a new Git repository:
- Run the following command to add all the files in the current directory to the repository:
git add .
- Run the following command to commit the files to the repository:
git commit -m "first commit"
- Go to your GitHub account and create a new repository by clicking on the “+” icon on the top right corner of your profile.
- In the next page give a name to your repository and add a description if you want.
- Once you have created the repository, you will be provided with a remote URL that you can use to push your local repository to GitHub. The URL should look something like
- Run the following command to add the remote URL to your local repository:
git remote add origin https://github.com/username/repositoryname.git
- Finally, run the following command to push your local repository to GitHub:
git push -u origin master