Information

Author(s) Mathieu Jadin
Deadline No deadline
Submission limit No limitation

Sign in

Git: Push the local modifications to the remote repository

This exercise will show you how to synchronize your local history with an history hosted on a remote server (on GitHub, Bitbucket, etc ).

In this example, you have two branches, one local branch master and its copy on origin (which is an alias for your remote repository ). The last commit is in the local history but not in the remote one.

https://inginious.org/course/git/git-push/git-before-push.svg

If you synchronize both branches, you will bring the reference of the remote master branch to the same commit as the one of the local branch:

https://inginious.org/course/git/git-push/git-after-push.svg

Pushing these modifications onto the remote history can be achieved with git push (voir documentation).


Download the archive which already contains a cloned repository in the subfolder clone. Push the local changes onto the remote copy. Afterwards, zip the whole folder and upload it.

Note that the remote repository in this exercise is not on GitHub or Bitbucket but inside the folder bare.git of the archive.

Your submission needs to respect the following hierarchy:

git-push/
├── bare.git/
|   └── [...]
└── clone/
    └── [...]

Max file size: 1.0 MiB
Allowed extensions: .zip