Skip to content

WebNinjaDeveloper.com

Programming Tutorials




Menu
  • Home
  • Youtube Channel
  • Official Blog
  • Nearby Places Finder
  • Direction Route Finder
  • Distance & Time Calculator
Menu

How to Create a Github Repository using Git Bash in Command Line

Posted on January 14, 2023

 

 

 

Steps to Create a Github Repo Using Git Bash

 

 

To create a new GitHub repository using Git Bash, you can use the following steps:

  1. Open Git Bash on your computer.
  2. Change the current working directory to the location where you want to create the repository.
  3. Run the following command to initialize a new Git repository:

 

 

git init

 

 

  1. Run the following command to add all the files in the current directory to the repository:
git add .
  1. Run the following command to commit the files to the repository:
git commit -m "first commit"

 

 

  1. Go to your GitHub account and create a new repository by clicking on the “+” icon on the top right corner of your profile.
  2. In the next page give a name to your repository and add a description if you want.
  3. 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 https://github.com/username/repositoryname.git.
  4. Run the following command to add the remote URL to your local repository:

 

 

1
git remote add origin https://github.com/username/repositoryname.git

 

 

  1. Finally, run the following command to push your local repository to GitHub:
1
git push -u origin master

 

 

Recent Posts

  • Android Java Project to Export Images From Gallery to PDF Document Using iTextPDF Library
  • Android Java Project to Capture Image From Camera & Save it in SharedPreferences & Display it in Grid Gallery
  • Android Java Project to Store,Read & Delete Data Using SharedPreferences Example
  • Android Java Project to Download Multiple Images From URL With Progressbar & Save it inside Gallery
  • Android Java Project to Capture Image From Camera & Save it inside Gallery
  • Angular
  • Bunjs
  • C#
  • Deno
  • django
  • Electronjs
  • java
  • javascript
  • Koajs
  • kotlin
  • Laravel
  • meteorjs
  • Nestjs
  • Nextjs
  • Nodejs
  • PHP
  • Python
  • React
  • ReactNative
  • Svelte
  • Tutorials
  • Vuejs




©2023 WebNinjaDeveloper.com | Design: Newspaperly WordPress Theme