Syncing to the remote
This section will guide you through syncing your local repo to the remote one.
Any change made so far is only being applied to the local copy of the repository (i.e. the copy on your laptop). To apply your changes to the remote repository (i.e. on GitHub or Azure DevOps), you need to “push” the changes.
Having recorded your changes, follow the instructions below to sync to the remote.
The first time you update your remote repo with the changes you committed to your local one (aka push the changes), use the command below:
git push --set-upstream origin <github_username>/main
After that, if you want to push changes you committed in the same branch use the following command:
git push
Click the green upwards arrow to push your changes to the remote repo. You can do this from the commit window as shown in the image below.
Alternative method
You can also do this from the side panel after closing the commit window as shown in the image below.
Click on the branches drop down menu at the top of the screen and click “Push”.
A screen will pop up with your previous committed changes.
Click “Push”.
Alternative method
Alternatively you can push and commit your changes at the same time from the commit window by clicking “Commit and Push” after you write your commit message.