How to push on git

Create a new folder with any name. like I'm creating a folder with the name django. And Same I'm going to create a new repository on my git hub account with the name django.

Desktop / django
Create a New folder with the name Django.

New Repository
log in to your GitHub account Login


Now opens the git base of your working directory.


Step - 1:

 > git init -b main 

Step - 2:

 > git add . 

Step - 3:

 > git commit -m "First commit" 

Step - 4:

Now copy the following HTTP link from your repository.

 > git remote add origin <remote link that you copy> 

Step - 5:

To check the remote setup
 > git remote -v  

Step - 6:

Now push your folder to the GitHub
 > git push origin main  

Comments