Yes! You can easily exclude files from a commit. You can use a ".gitignore" file to tell Git that you do not want to include certain files.
This is a hidden text file that you create in your repository's root folder. In this, you include the relative paths of files and directories that you want Git to ignore.