Note: Do git status
between all git commands.
- Stage the changes (
git add .
orgit add insert-filename-here
). - Commit the changes with a commit message (
git commit -m "insert description of changes here"
). - Push the commit(s) to the GitHub repo ("origin remote").
git push origin main
Note: Do git status
between all git commands to follow what is happening.
- Stage the changes: Preparing the changes to be committed.
- Terminal way:
git add .
orgit add insert-filename-here
- VS Code Source Control panel way: For each change listed, press the ➕ button to stage it (which will appear when hovering over the filename).
- Terminal way:
- Commit the changes with a commit message, describing the changes.
- Terminal way:
git commit -m "insert description of changes here"
- VS Code Source Control panel way: Press the "Commit" button. A new file called "COMMIT_EDITMSG" will be opened automatically. Write your commit message at the top of this file. When you are done, save the file, and close it to continue.
- Terminal way:
- Push the commit(s) to the GitHub repo.
- Terminal way:
git push origin main
main
here is the name of your current branch. In the case ofmain
, it is the "main timeline" of your project.origin
here is a remote repo.origin
is the default name of the official GitHub repo for your project.
- VS Code Source Control panel way: Press the "Sync Changes" button, and then "OK" when prompted.
- Terminal way: