1. Update the .gitignore file (inside the files/ folder) to reflect the following requirements:

  • Git should ignore every file in the many/ folder except the file many/file22.txt.
  • why_am_i_hidden.txt should not be ignored by Git.
  • ignore_me.txt should be ignored by Git.
  • Git should ignore any runaway.txt file in this/ and any of its current and future subfolders (hint: use a pattern).

2. Commit the updated .gitignore file.

Exercise ignoring-somethings

To download the exercise:

  • Navigate inside the gitmastery-exercises folder.
  • Run gitmastery download ignoring-somethings command.

Scenario:

Your task:

1. Update the .gitignore file (inside the files/ folder) to reflect the following requirements:

  • Git should ignore every file in the many/ folder except the file many/file22.txt.
  • why_am_i_hidden.txt should not be ignored by Git.
  • ignore_me.txt should be ignored by Git.
  • Git should ignore any runaway.txt file in this/ and any of its current and future subfolders (hint: use a pattern).

2. Commit the updated .gitignore file.


To verify your work:

  • Navigate to anywhere inside the gitmastery-exercises/ignoring-somethings folder (or any sub-folder of it).
  • Run the gitmastery verify command.

To reset the exercise and start over, navigate to the gitmastery-exercises/ignoring-somethings folder and run the gitmastery progress reset command.