The purpose of this article is to have a concise place for how to push to git (or GitHub as we are using that service for the tutorials) from the command line or Visual Studio Code directly. It is included here as a common action used, and was originally covered in "An introduction to Web Page Display".
The simple way to push from the command line is to open the terminal to the folder you are in, and run the following commands.
1git add . 2git commit -m "<DETAILED INFORMATION ABOUT THE CHANGES GOES HERE>" 3git push 4
To use Visual Studio Code's built in Source control, click the Source Control button on the side - it has three circles connected by a line. Then, write a message where it says Message, such as "Created Simple Index Page" and either click the check mark or hit
This is the equivalent of the first two
To get the changes from our computer to GitHub, we must push them. Either use the ellipsis (three dots) menu and click push or look for the syncing icon on the lower left and click it. Syncing will push and pull changes, meaning if there were changes from another computer they will be pulled in.
If any of the steps say that you must configure your name and email, you may do so with
1git config --global user.name "<YOUR NAME HERE>" 2git config --global user.email "<YOUR EMAIL HERE>" 3
If you did not already run through the login requirements earlier you will see the terminal with a message as highlighted in the first screenshot below, then a login box and sequence of giving permissions in the browser and Visual Studio Code as seen below.
Tags: Practical Programming, Supplemental, Git Push