• Hello, Visitor
  • Monday, June 24, 2024
Search Result
Home » More » GitHub » Upload existing project to github

Upload existing project to github

Hello friends, today in this blog you’ll learn how to upload your existing project to GitHub with the command line.

Step 01: Create a new repository in Github

Log in to your GitHub account and create a new repository


Step 02: Open git bash

Go to your project directory and open your git bash.

You can also use your command prompt


Step 03: Upload your project

#1 Initialize your project directory as a git repository

git init


#2 Add files in your new local repository

git add .

#3 Commit the files that you have staged in your local repository

git commit -m "First commit"

#4 Add the URL for the remote repository where your local repository will be pushed

git remote add origin https://github.com/nz-hridoy/new-repo.git


#5 Make a new branch named main

git branch -M main

#5 Push the changes of your local repository to GitHub

git push origin main


This will push your all local changes to the git repository.




Now, you have successfully uploaded your project to the GitHub repository.

Thanks for reading, hope it will help you.


Leave a Reply

You must Login to add a comment