1. Create a new GitHub account or login to an existing account and create a new repository.
2. Initialize a local Git repository, change the default branch from master to main, add files to commit, and check the status.
3. Commit changes locally with a message and push the code to the GitHub repository by specifying the remote repository URL and branch.
1. Create a new GitHub account or login to an existing account and create a new repository.
2. Initialize a local Git repository, change the default branch from master to main, add files to commit, and check the status.
3. Commit changes locally with a message and push the code to the GitHub repository by specifying the remote repository URL and branch.
1. Create a new GitHub account or login to an existing account and create a new repository.
2. Initialize a local Git repository, change the default branch from master to main, add files to commit, and check the status.
3. Commit changes locally with a message and push the code to the GitHub repository by specifying the remote repository URL and branch.
1. Create a new GitHub account or login to an existing account and create a new repository.
2. Initialize a local Git repository, change the default branch from master to main, add files to commit, and check the status.
3. Commit changes locally with a message and push the code to the GitHub repository by specifying the remote repository URL and branch.
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: