Next, we can now push from the cloned repository we just created.
First, navigate to the new tutorial2 folder on your machine. Add the bold text below to
sample.txt and commit the change the same way you did in the original tutorial repository.
Anyone can learn Git with this tutorial and Backlog
add: Register a change in an index
When the history log of your local repository branch updates, it will be ahead of the remote repository branch.
Now push the new commit to the remote repository.
Click the “Push” icon on the toolbar.
Ensure the main checkbox is checked, and proceed by clicking “OK”.
origin/main are on the same level. That means that the remote repository is now up to date with the latest change and is now in sync with our local repository.
You will now find the newly pushed commit listed under “Recent Updates” on Backlog’s Git page.
In the next section we will cover branches in greater detail, but this is now the location that each of the following references points to:
- origin/main: Points to the main branch of
originwhich is typically the remote repository.
- origin/HEAD: Refers to the current commit of
origini.e., the remote repository. In most cases, the local repository will point to the same location as
origin/HEADwhen performing a clone (the equivalent of
origin/main). However, this won’t happen if you check out to a different remote branch.
- main: Points to the main branch of the local repository.