[MonoDevelop] Autogeneration of .gitignore for MD projects

Michael Hutchinson m.j.hutchinson at gmail.com
Sun Apr 26 14:38:29 EDT 2009


On Sun, Apr 26, 2009 at 12:56 PM, Andy <andy at ninjagod.com> wrote:
> I use git to track two MD projects. If you have used git, you probably know
> that to stage changes into a commit, you have to add them - each time you
> make a commit. You can either add all the files that have changed or add
> them individually. Most people do "git add ." which does the former. This
> causes all new/changed files from build files, user preferences, etc, etc to
> be changed. This is different from svn/cvs where only files specifically
> added are tracked perpetually.
>
> The only way around this is to write a ".gitignore" file which contains
> specific rules to ignore specific files - usually build files and files that
> are seperate for each user and don't need to be tracked.
>
> My suggestion is that MD should create a .gitignore file by default
> containing a list of rules which should make it less error-prone for the
> user. This may include the userprefs file, the output paths, and any others
> I haven't encountered yet. You can mention this is autogenerated. I feel
> that it won't really affect people who don't or will never use git to track
> their MD projects, but since it will be hidden, it definitely will not hurt.

The logical place for this feature to go would be the Git addin,
though it would be useful even before all the other git features are
implemented.

Right now, MD has no mechanism for determining ignored files, but I
guess these are pretty much the inverse of the files that the VCS
addin explicitly adds, so it shouldn't be too hard to do
automatically. Alternatively we could have some API that addins could
use to flag files for ignoring.

MD could then set svn:ignore too, which so something we've always had
to do manually. The common ones IIRC are ProjectName.pidb,
SolutionName.userprefs, SolutionName.usertasks, *~, build/, bin/.
Autotools also requires selective ignoring of Makefile, Makefile.in,
configure and a load of directories.

-- 
Michael Hutchinson
http://mjhutchinson.com


More information about the Monodevelop-list mailing list