How to Push Code Directly from VSCode to Github

I have a confession. Though I am getting better, I sometimes find navigating my terminal pretty tricky. I had not used it before this year with any frequency and largely ignored the fact that it existed.
Recently, I decided to challenge myself and use the terminal to practice using GitHub. I’d been using GitHub desktop for my coding projects which made it pretty easy to push code to the remote repository with a few clicks. My transition to the terminal only was kind of a mess filled with error messages I’d eventually figure out. Lucky for me, I learned that pushing code directly from VSCode to GitHub is relatively pain free.
During a virtual meeting with a developer who was helping me with a project, they showed me how to push changes to my code right in VScode.
If you’ve never tried this before and use VScode, I encourage you to try it yourself with the below steps!
1 . Open up VS Code
2 . Drag the file you want to work on into VS Code as usual
3 . Open Github in your browser and create a new repository for your project you’d like to push
4 . Go back to VScode and click on source control on the lefthand side of the page
5 . Click on “Initialize repository”
6 . Type in the commit message and click the check mark to commit (or command enter)
7 . Select “Yes” for committing changes
8 . Click on the 3 tiny circles near the check mark
9 . Click on “Push”
10 . Enter your remote repository link and press enter
11 . Type in the remote name and hit enter
12 . Click on the 3 dots again and select “Push to”
13 . Select the repository you want to send it to
14 . Your code should be in the remote repository now, Yay!
15 . Check your GitHub repo to see if all the files have transferred by refreshing page
16 . Yay files were transferred for version control!
I hope this was helpful for anyone who didn’t know pushing directly from VSCode was possible. What is your preferred method for pushing to your remote repository?