Exercise

How can I remove unwanted files?

Git can help you clean up files that you have told it you don't want. The command git clean -n will show you a list of files that are in the repository, but whose history Git is not currently tracking. A similar command git clean -f will then delete those files.

Use this command carefully: git clean only works on untracked files, so by definition, their history has not been saved. If you delete them with git clean -f, they're gone for good.

Instructions 1/3

undefined XP
  • 1

    You are in the dental repository. Use git status to see the status of your repo.

  • 2

    backup.log appears to be an untracked file and it's one we don't need. Let's get rid of it. Use git clean with the appropriate flag to remove unwanted files.

  • 3

    Use ls to list the files in your current working directory. backup.log should no longer be there!