Adam's Lair Forum

game development and casual madness
It is currently 2019/11/12, 20:08

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 2016/04/01, 17:05 
Newbie
Newbie

Joined: 2016/03/31, 22:02
Posts: 7
Role: Hobbyist
Which files and directories should I exclude from git in .gitignore using Duality?
Thanks.


Top
 Profile  
 
PostPosted: 2016/04/01, 18:54 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2073
Location: Germany
Role: Professional
Before I start: While I think git is totally awesome, I'm a bit traumatized by its somewhat lacking support for large files and binary content (.ogg, .png, but also some of the Duality .res files) for content-heavy projects. If you have a large .png file with 20 iterations, your git repository will blow up in size and you will be forced to check out all revisions of that file on every new checkout - and the problem gets worse over time unless you bring up some rewrite history black magic. So if you're making a game and plan on version-controlling its content (which I strongly recommend), I'd consider using Subversion instead. SVN only requires you to download the head revision, not the entire history.

Or maybe someone else can suggest a version control system that's even better suited? I still feel like I haven't yet found an ideal solution for this problem in gamedev. :troubled:

Anyway! Going back to your original question: I don't have a .gitignore-compatible file ready, but I can give you list of files I usually ignore. These are the basics:
Code:
Backup
DesignTimeData.dat
EditorUserData.xml
logfile.txt
logfile_editor.txt
logfile_editor_prev.txt
perflog.txt
perflog_editor.txt
Source/Packages
Source/Media
Source/Code/*.suo
Source/Code/*.vs
Source/Code/*.user
Source/Code/EditorPlugin/bin
Source/Code/EditorPlugin/obj
Source/Code/CorePlugin/bin
Source/Code/CorePlugin/obj


Note that Source/Media is where Duality stores the source files for all the Resources you've imported and you can freely use that folder to store additional (non-imported) stuff like .psd files or similar. Source/Media is entirely optional and not required in any way; Duality will just export your Resources again when needed. Whether or not you'd like to version-control it anyway is a matter of personal preference.

Source/Packages is where the package management system stores and extracts all the packages it downloaded. If it's not there, Duality will re-download those packages once, but the initial installation time after a new checkout is definitely worth it to keep all that clutter out of the repository.

That said, you can make use of the package management to essentially keep 90% of Duality's binaries and packages out of version control entirely, because the editor will re-download them anyway, so in addition to the above list, here's what you can ignore as well when relying on that:

Code:
Plugins
AdamsLair.WinForms.dll
AdamsLair.WinForms.pdb
AdamsLair.WinForms.xml
Aga.Controls.dll
Aga.Controls.pdb
DDoc.chm
Duality.pdb
Duality.xml
DualityEditor.pdb
DualityEditor.xml
DualityLauncher.exe
DualityLauncher.exe.config
DualityLauncher.pdb
DualityPrimitives.XML
DualityPrimitives.pdb
DualityUpdater.exe
FarseerDuality.dll
FarseerDuality.pdb
FarseerDuality.xml
Microsoft.Web.XmlTransform.dll
NVorbis.XML
NVorbis.dll
OpenAL32.dll
OpenTK.GLControl.dll
OpenTK.GLControl.xml
OpenTK.dll
OpenTK.dll.config
OpenTK.pdb
OpenTK.xml
PopupControl.dll
PopupControl.pdb
WeifenLuo.WinFormsUI.Docking.dll
WeifenLuo.WinFormsUI.Docking.pdb


Note that ignoring the entire Plugins folder from the above list will mean that your game plugin is ignored as well, so you will have to recompile your source code once after checkout - or you include its binaries in the Plugins folder, but manually ignore every other file in there.

So ideally, you'll end up with only around 10 files in your project root, the Data folder and your code in Source.

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
PostPosted: 2016/04/01, 19:36 
Forum Adept
Forum Adept

Joined: 2014/12/13, 00:11
Posts: 398
Location: Brazil
Role: Gamer
You can use a plugin I created that pretty much handles it for you: viewtopic.php?f=18&t=450

Adam wrote:
There's Git Large File Storage, that handles big files.

_________________
I only know the basics of C#. I have no advanced knowledge.


Top
 Profile  
 
PostPosted: 2016/04/01, 21:09 
Newbie
Newbie

Joined: 2016/03/31, 22:02
Posts: 7
Role: Hobbyist
RockyTV wrote:
You can use a plugin I created that pretty much handles it for you: viewtopic.php?f=18&t=450

I'll check it out. Thank you both.


Top
 Profile  
 
PostPosted: 2016/04/03, 14:41 
Veteran Member
Veteran Member
User avatar

Joined: 2016/01/10, 10:56
Posts: 151
Location: Budapest
Role: Hobbyist
Hey!
Here's my .gitignore. It excludes most of binaries, just the source and the essential ones remain. I hope it helps!
Code:
# Duality gitignore

# Directories
.git
.vs
Backup
Source/Code/../bin
Source/Code/../obj
Source/Code/packages
Source/Packages
Source/Media
Plugins

# File extensions
*.dll
*.pdb
*.xml
*.XML
*.chm
*.exe
*.config
*.txt

# Files included
!Duality.dll
!DualityEditor.exe
!DualityEditor.exe.config
!DualityPrimitives.dll
!NuGet.Core.dll
!PackageConfig.xml
!VistaBridgeLibrary.dll
!Windows7.DesktopIntegration.dll
!packages.config


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group