Documentation Monster
DM new project .gitgnore & .gitattributes files are identical
Gravatar is a globally recognized avatar based on your email address. DM new project .gitgnore & .gitattributes files are identical
  Richard Kaye
  All
  Sep 23, 2026 @ 12:10pm

This got lost in the other thread so now it has one of its own. 😃

One thing I am still seeing is change detection in git where no changes have been made, seemingly by just by opening the project. I think this could be line-ending stuff? I then noticed that the .gitignore and the .gitattributes files created with the new project are identical. Here's the content of both files:

*.bak
*.*.bak
*.tmp
*.saved.md
~*.*
__*.*
wwwroot/
_docmonster-*/

Should not the .gitattributes look something like this?

# Default: let Git normalize text files (LF in the repo, native on checkout)
* text=auto

# Files that should keep LF even on Windows
*.md    text eol=lf
*.sh    text eol=lf

# Files that should keep CRLF
*.bat   text eol=crlf
*.cmd   text eol=crlf
*.prg   text eol=crlf
Gravatar is a globally recognized avatar based on your email address. re: DM new project .gitgnore & .gitattributes files are identical
  Rick Strahl
  Richard Kaye
  Sep 23, 2026 @ 07:09pm

My projects all have a .gitattributes that looks like this:

.gitignore file for DM projects

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: DM new project .gitgnore & .gitattributes files are identical
  Richard Kaye
  Rick Strahl
  Sep 24, 2026 @ 02:17am

DM must create both of those automatically when a new project is setup? I will create another new one from the WWHB json and focus on what gets created as far as those git files are concerned.

Gravatar is a globally recognized avatar based on your email address. re: DM new project .gitgnore & .gitattributes files are identical
  Rick Strahl
  Richard Kaye
  Sep 24, 2026 @ 08:00am

Yes those are auto-created once when a new project is created.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: DM new project .gitgnore & .gitattributes files are identical
  Richard Kaye
  Rick Strahl
  Sep 24, 2026 @ 08:19am

Then I'll stick to my conclusion that gitattribute is not being created correctly as it is identical to gitignore. At least when importing from WWHB. I don't want to make any assumptions about how/when those files are created.

Gravatar is a globally recognized avatar based on your email address. re: DM new project .gitgnore & .gitattributes files are identical
  Rick Strahl
  Richard Kaye
  Sep 24, 2026 @ 10:14am

There was a bug related to the creation of the file, and in some cases that would cause the ignore file to get generated into attributes.

Not sure what path that is, since all my projects have the correct file, but it'll work properly for all scenarios now.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: DM new project .gitgnore & .gitattributes files are identical
  Richard Kaye
  Rick Strahl
  Sep 24, 2026 @ 11:09am

Not to keep this thread going any longer than necessary I'll just reiterate that I created a brand new DM project by importing from WWHB yesterday, and I got exactly what you describe as a bug that was fixed. FWIW my installed version of DM is 0.5.4.5

Gravatar is a globally recognized avatar based on your email address. re: DM new project .gitgnore & .gitattributes files are identical
  Rick Strahl
  Richard Kaye
  Sep 24, 2026 @ 11:56am

Meaning you got the wrong file, or the right file? Either way it should be always correct going forward.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: DM new project .gitgnore & .gitattributes files are identical
  Richard Kaye
  Rick Strahl
  Sep 24, 2026 @ 12:25pm

Meaning I got the wrong gitattributes file which I've since updated manually. I'm happy to do another full create from wwhb json tomorrow if you want.

© 1996-2026