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 Windows
  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, add the bold text below to the sample.txt file in the newly cloned directory and commit the change.

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.

Right-click on the directory “tutorial2″ and click “Push.”

Right-click tutorial2 directory and click Push button

Click “OK” to proceed to the next screen.

Click “OK” again.

Working in tutorial2

The following screen shows the push in progress. Once it is complete, click “Close” to finish.

The next screen will be shown and the Push will begin

Select “TortoiseGit” > “Show log” from the right-click menu. Now main and origin/main are on the same level. That means the remote repository is now updated with the latest change and in sync with the local repository.

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 be the case 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