This is how you exclude chaff files
- Create a file called ".gitignore" in your repository directory. This is incredibly easy in Windows, despite the "extension only" Unix style: Open Notepad, click Save As, navigate to your repository directory (not in the .git directory, but at the same level) and save the file as ".gitignore".
- Edit the file to include the names or patterns of the files or directories you want Git to ignore. As an example, I used this list
- Rescan the repository in the GitGui - this should now look much cleaner
- Add .gitignore to the repository; stage, sign-off, commit etc
That's it, it's too easy!
I've used this already to hide all my IDE files. Nice work!
ReplyDelete