Once a change to the code is made, we will need to commit them both into our local repository and to GitHub. Ensure that Git Bash is set to the correct working directory. Once the directory is correct, type git status to check what changes have been made locally in Git Bash:
Determine the changes that have been implemented in each file using the git diff command:
Lines that have been added are shown in green and prefixed with a "+". Those lines which have been removed are shown in red and prefixed with a "-".
To commit a change, use the git commit command:
Remember to include a comment using the -m switch.
Once all of your changes have been committed to your local repository, you need to push them up to GitHub using the git push command:
Your latest changes will be visible in GitHub, as follows: