Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start new projects with a seed .gitignore and .gitattributes file #2922

Closed
dicksonlaw583 opened this issue Oct 6, 2023 · 8 comments
Closed
Assignees
Labels
documentation Improvements or additions to documentation are required by this issue feature request New feature (or a request for one)
Milestone

Comments

@dicksonlaw583
Copy link

Is your feature request related to a problem?

Following the 2023.1 update, .resource_order and .old files began appearing in projects, which should not be checked into source control by default. If someone sets up Git but isn't aware of this change (especially if they are using a source control tutorial), they may accidentally add these files to their repository, resulting in constant "file modified" issues and merge conflicts from regular use.

Also, historically GM projects on GitHub had been mistakenly identified as about 20%+ YACC because of the .yy files (example). That false detection can be turned off by adding a .gitattributes file, but there has been little community awareness of the issue.

GM projects should be source-control-friendly by default, but these issues get in the way of that.

Describe the solution you'd like

I would like new projects to be created with a default .gitignore and .gitattributes file that covers current use cases.

.gitignore:

# Windows

# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

# Mac

## General
.DS_Store
.AppleDouble
.LSOverride

## Icon must end with two \r
Icon

## Thumbnails
._*

## Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

## Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# GameMaker temporary files
*.resource_order
*.old

.gitattributes:

# Ignore .yy files for language statistics 
*.yy linguist-generated=true

Describe alternatives you've considered

I have been gradually adding these to my existing projects as I migrate them to the 2023 format, but going forward, I would like to see new projects start with them.

Additional context

No response

@dicksonlaw583 dicksonlaw583 added the feature request New feature (or a request for one) label Oct 6, 2023
@metacrab
Copy link

I'd like to add a +1 to this. I just wasted half an hour researching whether I can safely add .resource_order to the gitignore before I found this thread, seems like it should be default (anyone who has used GameMaker with Git runs into these messy merge issues)

@CalumLaverock
Copy link

A preference has been added into Plugin -> Source Control (Git) -> Add skeleton .git defaults which, when checked, will automatically add default .gitignore and .gitattributes files as described in the issue here (as well as in #4820) into the project folder when the project is created.

@YYBartT YYBartT added the documentation Improvements or additions to documentation are required by this issue label Mar 26, 2024
@Emc1923
Copy link

Emc1923 commented Mar 27, 2024

Reopening as the Mac IDE does not generate the files on new projects. Windows and Ubuntu look fine.

@Emc1923 Emc1923 reopened this Mar 27, 2024
@CalumLaverock
Copy link

This seems to be more due to mac very thoroughly hiding files beginning with a dot, these can be shown by doing cmd+shift+dot but the files do seem to actually be there on mac as well.

@Emc1923
Copy link

Emc1923 commented Apr 3, 2024

Verified done as per comment. Thanks!

@YYBartT
Copy link

YYBartT commented Apr 15, 2024

Moving this ticket back to "Done" since documentation still needs to be added.

@YYBartT YYBartT self-assigned this Apr 15, 2024
YYBartT added a commit to YoYoGames/GameMaker-Manual that referenced this issue Apr 16, 2024
…ibutes file

YoYoGames/GameMaker-Bugs#2922
YoYoGames/GameMaker-Bugs#4559

* Updated the screenshot on the "Plugin Preferences" page and listed the new preferences
* Added info on the default .gitignore and .gitattributes files and LF endings on the "Project Format" page, added links to prefs where appropriate
@YYBartT
Copy link

YYBartT commented Apr 16, 2024

The contents of the default .gitignore and .gitattributes files have been documented on the manual's Project Format page. The new preferences have been added to the Plugin Preferences page and the screenshot has been updated.

@mgeddesGM
Copy link

verified as of IDE v2024.400.0.550 Runtime v2024.400.0.567

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation are required by this issue feature request New feature (or a request for one)
Projects
Status: Verified
Development

No branches or pull requests

8 participants