I tried all the obvious tricks, in the obvious order: select the files, hit delete; select the files, right click, hunt for "exclude"; check each menu item; Google it; search StackOverflow; search the GitHub help. Nothing that said "This is how you exclude chaff files". So...
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!