Information

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

Sign in

Git: Synchronize the local copy with the remote one

When you work in a team, it might happen that new commits are present in the repository but not in your local history, such as:

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

You need to pull the remote modifications to your main branch .As you have no local commit that is not present in the remote branch pull only updates the local branch.

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

Now, let's imagine that you have a local commit unpushed to the remote copy:

https://inginious.org/course/git/git-pull/git-before-pull-2.svg

If you use pull, git will automatically create an additional commit that will merge both branchs together.

https://inginious.org/course/git/git-pull/git-after-pull-2.svg

You then need to push the new commit onto the remote branch to finish the synchronization.

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

The corresponding command is git pull (see documentation).


Téléchargez l'archive qui contient déjà un repository cloné dans le sous-dossier clone. Synchroniser-le avec son repository distant. Une fois que c'est fait, ré-archivez le dossier complet et uploadez-le.

Le message de commit de fusion devra être "MERGE".

Notez que le repository "distant" dans cet exercice n'est pas sur github ou dans bitbucket mais dans le dossier bare.git de l'archive.

Votre soumission devra avoir l'architecture suivante:

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

Max file size: 1.0 MiB
Allowed extensions: .zip