Steps To Create Repository and Push Code To Github

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Steps to Create Repository and push code to GitHub

1. Install Git in your System.


2. Open Browser and open GitHub on it.
3. Login or Create new account on GitHub.
4. Create New Repository.

5. After Creating Repository the interface will be shown as below:

6. Open VS Code (add extensions of git and github)


Then open the folder containing code which you want to push and open terminal
7. In Terminal,Use Commands git init ..(To initialize Git)
git branch –m master main ..(To Change Branch From Master to Main)
git add . …(adding all files of the folder to commit)
git status …(checking status of the File that we are going to push)
git remote add origin http: ..(refer the link from 5th command image)..(adding the link of repository
to push)
git commit –m “First HTML” ..(commiting and adding comment)
git push –u origin main ..(pushing the files to github)
Now verify your Account then Your Code will be Pushed Successfully
8. After Pushing the File the Interface will be:

You might also like