Easy Way to Push Code to Github Using a Terminal
1 min readJan 21, 2023
Here are the few steps that you need to follow to push your code to github:
- Make a Repository to github by logging in to your profile and clicking on the new Repo on the left-hand side of the screen.
- Open VS Code with your project folder.
- Open the command prompt terminal.
- Ensure you install git in your system and set the user name, email, and password.
- Now start with git init as the very first command.
git init
6. Go to your github repo and copy the URL of your repo.
7. Write another command like:
git remote add origin LinkToRepo
8. Now, add all your project files to the repo.
git add .
9. It’s time to commit to your repo.
git commit -m "Some Comment/Message"
10. Now push the code at last and refresh your github page on chrome.
git push -u origin master
Hope it will help! You can now Buy me a coffee.
Thank You : )