Information

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

Sign in

Git: Add files to the staging area

In this exercise, you will need to select changes to add to the staging area.

You will need to use the command git add file [other-files...]. You may use it with the option -p to select only a subset of the modifications inside a single filde.

To see what is already inside the staging area, you may use the command git status. The files highligted in green are in the staging area. git diff --cached indicate the precise modifications that have been staged.

You may also use graphical tools such as Sourcetree or GitKraken.


Download the archive which contains a cloned repository in the subfolder clone. Add the files to_stag.txt et to_stag_2.txt to the staging area. Afterwards, zip the whole folder and upload it.

Your submission needs to respect the following hierarchy:

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

Max file size: 1.0 MiB
Allowed extensions: .zip