Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uploading a project to GitHub using the command line

Tags:

git

github

How do I upload a project to GitHub through the command line? I have installed Git on Windows. I am uploading my project by creating a new repository, but it did not upload by command line.

like image 224
Rehman Maqsood Avatar asked Mar 19 '26 16:03

Rehman Maqsood


1 Answers

Step-1:

Download git from here

Step-2:

Create a repository in github

Step-3:

goto your project folder

step-4

open git bash or cmd and initialize your project by typing git init

step-5

add files by typing git add . for adding all file

step-6

commit your project by typing git commit -m 'your message'

step-7

copy your remote location from github by typing

git remote add origin 'your repository link'

step-8

push your code in github by typing git push -u origin master

and thats all you need to do. Or check github documentation.

like image 154
Pradip Dhakal Avatar answered Mar 22 '26 07:03

Pradip Dhakal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!