Introduction
GitHub Desktop has a size limitation. Looking at the files in a typical upload there appears to be two types of files that can easily be eliminated from the upload:
- Files that are produced during building
- Files that contain sensitive information that are used during development but are not needed to rebuild the app
GitPrep was developed to remove all entities that fall into either category listed above from a Git directory before GitHub Desktop uploads the submission to GitHub. There are four commands:
- Specify A Git Directory
- Display Redundant Files -- Explores the Git tree looking for and displaying a list of files that may be deleted
- Delete Files Displayed -- Every file in the list displayed will be deleted
- Display Large Files -- Display a list of large files, useful when GitHub Desktop still complains
Rules for Finding Files to Delete
First of all all the subdirectories in the tree contain files that might be deleted except for the following directories:
- .git
- .vs
- Debug
- Junk
- obj
One reason for not exploring those directories is that they don't belong to the developer. Another reason is that the entire directory is to be deleted. Here is a list of directories to be deleted in entirity:
- Data
- Data01
- Data02
- Debug
- .vs
- Junk
- obj
- bin
Regardless of the directories, files with an extension in the following list will be listed for deletion:
- obj
- idb
- pdb
- tlog
- lastbuildstate
- ilk
- wixobj
- log
- tlh
- tli
- iobj
- ipdb
- vtg
- lib
- res
- lastbuildstate
- cache
- wixpdb
- accdb
- xlsx
- csv
- eml
I suppose that these list could have been contained in a file somewhere, but it was easier just to put them in a static vector in the application.