How to add a project to new GitHub repository

CelestialDevStory
2 min readDec 29, 2023

--

This task would be super easy to a pro, but I’m gonna describe how to do it step by step from the scratch for the beginners.😎

  1. Open your project in your working directory.

I’ll provide the commands only now on. I think it’ll be easy to understand, instead reading huge explanations.

2. git init

3. git remote add origin <your repostitory url>

ex : https://github.com/MyGitHubAcc/AD1GitHubRepo.git

4. git add .

5. git commit -m “Initial commit”

6. git push -u origin master

If you are working on a branch other than master, replace “master” with the name of your branch.

That’s it. Now you can open your GitHub Repository, your project will be added successfully.😇

If you’re having doubts in creating a GitHub Repository; here’s my previous blog post about it 👇

If you’re still reading this, you’re incredible!. 🤓 Don’t forget to share your thoughts about this by commenting. Drop a like too, and also follow if you’re willing to find more insight through the software world.💫

--

--

CelestialDevStory

🌈Follow me if you're willing to explore the coding universe🌏with a software engineer👨‍💻excited to break complex coding barrier, turning it into a story💫🌘