Create a new directory and perform the following tasks:

  1. Use the init command to initialize a new local repository inside the directory you just created.

  2. Check if a (hidden) directory .git has been created. What does this directory contain? What is it used for?

  3. Create a new README file.

  4. Use the status command to check the status of the newly created file. What does it say?

  5. Use the add command to add the file to the staging area.

  6. Execute the command status again. What’s the difference now?

  7. Use the commit command to commit the contents of the staging area.

  8. Create a directory myproject and add some files to this directory.

  9. Use the add command to add all of these new files to the staging area, but without using the names of the individual files. Check if you succeeded with the status command and eventually commit the staged files.

  10. Change the contents of one of the files and use the (git) diff command to view the changes.

  11. Use the add command on the changed file and execute (git) diff again. What do you see? What do you need to add to your command to see the changes again? Commit all changes.

  12. Use the log command to get an overview of all commits created so far.

  13. Use the show command to look at the details of an individual commit.

  14. Use the git rm command to remove a file and check the status. Commit the change.

  15. Now use the non-git rm command to remove another file and check the status. What difference do you notice compared to the previous step? Commit the change.

  16. Use the (git) diff command to look at all changes that were introduced in one of the first three commits, i.e. all changes of these three commits combined.