Backlog uses cookies to deliver our services. By visiting our website, you agree to the use of cookies as described in our Cookie Policy.

Select your PC environment:

Let's try pushing from the previously cloned repository.

Windows

First, lets add the bold text below to "sample.txt" in the newly cloned directory and commit the change.

Git commands even a monkey can understand
add: Register a change in an index

Working in tutorial2

We can see that the history log of our local repository branch has been updated and is now ahead of the remote repository branch.

The local repository‘s commit has advanced.

Working in tutorial2

Next, let's push this new commit to the remote repository. Right-click on the directory "tutorial2"and click "Push".

Right-click "tutorial2" directory and click Push button.

Working in tutorial2

Click "OK" to proceed to the next screen.

Click OK button

Working in tutorial2

The following screen shows that "Push" is in progress. Once it is complete, click "Close" to finish.

The next screen will be shown and the Push will begin.

Working in tutorial2

Select TortoiseGit > Display log from the right-click menu. Now "master" and "origin/master" are both on the same level. What that means is that the remote repository is now up to date with the latest change and is now in-sync with our local repository.

Origin/master‘s commit has progressed.

Let's review the location that each of the following references point.

  • origin/master
    Points to the master branch of "origin" which is typically the remote repository.
  • origin/HEAD
    Refers to the current commit of "origin" which is the remote repository. In most cases, the local repository would always point to the same location as origin/HEAD when performing a clone, which is also the equivalent of origin/master. This won't be the case, however, if you check out to a different remote branch.
  • master
    Points to the master branch of the local repository.

We will cover branch in greater detail in the "Working with Git" section.

Mac

First, lets add the bold text below to "sample.txt" in the newly cloned directory and commit the change.

Git commands even a monkey can understand
add: Register a change in an index

Working in tutorial2

We can see that the history log of our local repository branch has been updated and is now ahead of the remote repository branch.

The local repository‘s commit has advanced.

Working in tutorial2

Next, let's push this new commit to the remote repository. Click "Push" in the toolbar.

Click Push in the toolbar

Working in tutorial2

Make sure the master checkbox is checked and proceed by clicking "OK".

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

Working in tutorial2

Now "master" and "origin/master" are both on the same level. What that means is that the remote repository is now up to date with the latest change and is now in-sync with our local repository.

Origin/master‘s commit has progressed.

Let's review the location that each of the following references points.

  • origin/master
    Points to the "master" branch of "origin" which is typically the remote repository.
  • origin/HEAD
    Refers to the current commit of "origin" which is the remote repository. When doing a clone, in most cases, the local repository would always point to the same location as origin/HEAD; that is also the equivalent of origin/master. This won't be the case however, if you checkout to a different remote branch.
  • master
    Points to the "master" branch of our local repository.

We will cover branch in greater detail in the "Working with Git" section.

Command Line

First, lets add the bold text below to "sample.txt" in the newly cloned directory and commit the change.

Git commands even a monkey can understand
add: Register a change in an index
$ git add sample.txt
$ git commit -m "append description of the add command"
[master 1ef5c8c] append description of the add command
1 files changed, 1 insertions(+), 1 deletions(-)

Working in tutorial2

Next, let's push this new commit to the remote repository

You can omit the repository and branch name when executing "push" in a cloned repository directory.

$ git push
Username: <username>
Password: <password>
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 351 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://monkey.backlogtool.com/git/BLGGIT/tutorial.git
    486789c..1ef5c8c master -> master

You will now find the newly pushed commit on Backlog. It will be listed under "recent updates" on Backlog's Git page.

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