Hello, Visitor
Upload existing project to github

Upload existing project to github

MORE 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.


Like 0
Related Posts
What is GitHub and how it works
What is GitHub and how it works
14 January 2026 · 199 Views
GitHub tutorial for beginners step by step
GitHub tutorial for beginners step by step
18 January 2026 · 207 Views
How to create your first GitHub repository
How to create your first GitHub repository
19 January 2026 · 222 Views

Comments (0)

No comments yet. Be the first to leave your thoughts!

Leave a Comment

You need to login to post a comment

Login to Comment