-
Mark HOEBEKE authored9f51fe3d
exercises.md 1.75 KiB
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
- Check with status that the next commit matches what you expect.
- Run the commit.
- Display the log to check the commit has been added to your local history track.
Propagate the changes to your repository on GitLab
- Push your recent commits the local repository to the remote repository.
- Check your project page on GitLab to verify the push went as expected.
Shuffle contents of your local repository
- Rename the image file you recently added by adding
_01
before the extension (i.e.bumblebee.jpg
becomesbumblebee_01.jpg
) - 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. - Add a file called
mistake.md
with some text contents of your choice. - Commit all your latest changes.
- Check with
status
andlog
that all went as expected. - Remove the
mistake.md
file. - Commit all your latest changes.
- After checking all went well, propagate the changes to the remote GitLab project.
Synchronize your local repository afer making changes to the remote repository
- Using the GitLab Web interface, make some changes to your remote repository (add an entry to the
.md
file, and add an image). - On your workstation, in your local repository:
- Fetch the latest commit(s) from the remote repository.
- Check that your local repository is at least one commit behind.
- Synchronize your local repository with the latest commits from the remote repository.