Version control - should there be a .gitignore for GMS1 and GMS2?

csanyk

Member
I use github for my version control solution. When I create a new repository, there's an option to set a .gitignore appropriate to the dev tool or language that I'm using. Of course, GameMaker Studio isn't one of the options.

  1. How can I define a .gitignore that would be appropriate for GMS1 as well as GSM2?
  2. Is it possible to get github to use a custom gitignore, or would I need to persuade them to support GMS?
 

Tthecreator

Your Creator!
Which files do you want to gitignore?
A game maker project is pretty self containing and I don't think any workspace settings are in it.
If you do find stuff you want to ignore, you have to tell git to ignore them BEFORE you commit and/or push those files or else the ignore will not work.
Most IDE's with build in git support just have a simple ignore button build in but since GM isn't one of those you should probably just add a line to the .gitignore file like:
Code:
/example.txt
See:
https://git-scm.com/docs/gitignore
and https://help.github.com/articles/ignoring-files/
 

csanyk

Member
Which files do you want to gitignore?
A game maker project is pretty self containing and I don't think any workspace settings are in it.
If you do find stuff you want to ignore, you have to tell git to ignore them BEFORE you commit and/or push those files or else the ignore will not work.
Most IDE's with build in git support just have a simple ignore button build in but since GM isn't one of those you should probably just add a line to the .gitignore file like:
Code:
/example.txt
See:
https://git-scm.com/docs/gitignore
and https://help.github.com/articles/ignoring-files/
I don't know what files I should have git ignore, that's part of my question.

Over the weekend, I was working on a project in GMS2 that I was managing in github, and at some point the project became corrupted -- when I tried to open the project, it gave an error having to do with a view that couldn't be open. (I'd post the exact error text, but I no longer have it, and can't replicate it, as I've had to trash the project and start over.) I'm guessing that this was referring to a view of the IDE, eg some workspace settings related stuff, not "views" as in what we used to have before cameras replaced them in GML. In looking through the project files, there was a folder for views, with a bunch of .yy files in there that had long random strings for names. I found the file that the error message referred to, and deleted it, but the project still wouldn't open up. So I had to roll back to an earlier version and start over. I was wondering if perhaps these files should be ignored by git, and if there might be other files in a GMS2 project that git should also ignore.
 

FrostyCat

Member
The only file that I know for sure should be ignored is SCIfile.txt (specific to GMS 1.x's source control integration).

As for the views directory in GMS 2.x, though it tends to cause conflicts a lot and can kill a project if mis-merged (see 0029196), not checking them in at all isn't really an option either. The group structure of the project format depends on them.
 

csanyk

Member
The only file that I know for sure should be ignored is SCIfile.txt (specific to GMS 1.x's source control integration).

As for the views directory in GMS 2.x, though it tends to cause conflicts a lot and can kill a project if mis-merged (see 0029196), not checking them in at all isn't really an option either. The group structure of the project format depends on them.
I guess this begs the question, then: is there a method to recover from views corruption? It'd be great if there were a project repair utility, or, better, if they weren't prone to getting corrupted to begin with.

What's weird about this, in my case, is that I was not collaborating with anyone on this project, and yet still using version control introduced this conflict. I didn't even pull the project down from the repository -- only made commits and pull requests. And still my project ended up getting corrupted. If I can't trust GMS2 to work with version control, I can't use it for any serious work.
 
Last edited:
Top