Adding an existing project or initial push to GitHub using the command line?

In this post I would like to show you ,How to Add an existing project to GitHub using the command line with simple steps.

Open Terminal (for Mac and Linux users) or the command prompt (for Windows users). Change the current working directory to your local project.Initialize the local directory as a Git repository to do that run below command

Then add the files in your new local repository. This stages them for the first commit.

Commit the files that you’ve staged in your local repository.

Now in the Command prompt, add the URL for the remote repository where your local repository will be pushed.

Push the changes in your local repository to GitHub.


Completed steps:

On server:

On client:

By Arjun

I am Arjun from Hyderabad (India). I have been working as a software engineer from the last 7+ years, and it is my passion to learn new things and implement them as a practice. Aside from work, I like gardening and spending time with pets.

0 0 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments