diff --git a/git-remote/exercises.md b/git-remote/exercises.md new file mode 100644 index 0000000000000000000000000000000000000000..550abfe296434167a5aaf660fd662ef37664e3b6 --- /dev/null +++ b/git-remote/exercises.md @@ -0,0 +1,17 @@ +# Working with remote repositories - Exercices + +# Cloning a repository with HTTPS + +In a folder on your workstation, clone your GitLab project repository using the HTTPS protocol. + +The rename the folder (ex. : prefix the folder name with `https-`) + +# Cloning a repository with SSH + +- Generate an SSH key pair on your workstation. +- Copy your public key in your GitLab account settings. +- Check that you have a working setup using [this tutorial](https://docs.gitlab.com/ee/user/ssh.html#verify-that-you-can-connect) +- Clone your project's repository using the SSH protocol. + + + diff --git a/gitcli-basics/exercises.md b/gitcli-basics/exercises.md new file mode 100644 index 0000000000000000000000000000000000000000..a2d74cf8993d0a2dbfdfd854e0093c9bbddde3d8 --- /dev/null +++ b/gitcli-basics/exercises.md @@ -0,0 +1,29 @@ +# Git Command Line Basics - Exercises + +## Add contents to your local repository + + Add an entry to your animal description file, as well as an image to the `images` folder. + +## Commit the changes to your local repository + + 1. Check with status that the next commit matches what you expect. + 2. Run the commit. + 3. Display the log to check the commit has been added to your local history track. + +## Propagate the changes to your repository on GitLab + + 1. Push your recent commits the local repository to the remote repository. + 2. Check your project page on GitLab to verify the push went as expected. + +## Shuffle contents of your local repository + + 1. Rename the image file you recently added by adding `_01` before the extension (i.e. `bumblebee.jpg` becomes `bumblebee_01.jpg`) + 2. Add a new image file for the same animal with a filename including `_02` (i.e. `bumblebee_02.jpg`) If you can't find one you can cheat and copy the first image. + 3. Add a file called `mistake.md` with some text contents of your choice. + 4. Commit all your latest changes. + 5. Check with `status` and `log` that all went as expected. + 6. Remove the `mistake.md` file. + 7. Commit all your latest changes. + 8. After checking all went well, propagate the changes to the remote GitLab project. + +