Skip to main content
  1. Learn
  2. Software Development
  3. Guides
  4. Git tutorial
  5. How to use Git
  6. How to use Git on Mac
  7. Push from a cloned repository
GuidesSoftware DevelopmentBacklog
Git

Project and code management together.

Push from a cloned repository

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.

The local repository‘s commit has advanced.

Now push the new commit to the remote repository.

Click the “Push” icon on the toolbar.

Click Push in the toolbar

Ensure the main checkbox is checked, and proceed by clicking “OK”.

Confirm that the main checkbox is selected, then click the OK button.

Now main and 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.

Origin/main‘s commit has progressed.

You will now find the newly pushed commit listed under “Recent Updates” on Backlog’s Git page.

The commit you have just pushed has been added to the lastest update

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 origin which is typically the remote repository.
  • origin/HEAD: Refers to the current commit of origin i.e., the remote repository. In most cases, the local repository will point to the same location as origin/HEAD when 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.

Subscribe to our newsletter

Learn with Nulab to bring your best ideas to life