- Hello, Visitor
- Monday, November 11, 2024
Search Result
Upload existing project to github
Posted by NzCoding - 01 October 2022
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.
Popular Posts
Featured Post
Categories
- Html Css 7
- More 3
- Card Design 2
- Spinner 2
- GitHub 2
- Laravel 16
- Livewire 12
- Javascript 1
- Form Design 1
- SEO 1
- Php 0
Leave a Reply