I'm a single developer trying to use Git (I'm told it's much better than SVN) to keep track of my XNA project. Would I copy my project into a bare repository and then add the files? If so, do I need all of them? Also, what do I do with my Content project and files - will Git copy them over each commit/push, massively increasing repo size?


With Git you can supply a .gitignore file which can contain wildcards for files that dont need to be stored in the repository. As per your idea of creating the repository and then adding the files, that would definitely work. Just be sure to read up on how git works as it seems a bit backwards in comparison to svn. Look for a program called Git extensions which is essentially a gui wrapper for git that will make things a bit easier.

Git is not so good at binary files so you'll have to include your output xnb files in the .gitignore so that they aren't constantly being updated but your source content should only have to be updated when you actually make changes.

  • \$\begingroup\$ What about all the other rubbish (all the .pdb files, .suo, etc)? They're autogenerated but do I need them? \$\endgroup\$ – William Osborne Mar 8 '13 at 19:43
  • \$\begingroup\$ Here is a link to the conversation on a different thread: stackoverflow.com/questions/2143956/… In addition to that simply add the wildcards for the binary content files. \$\endgroup\$ – RobCurr Mar 8 '13 at 20:08
  • \$\begingroup\$ Cheers, that worked fine apart from an error saying it couldn't copy the xnb files which fixed itself on restart. \$\endgroup\$ – William Osborne Mar 9 '13 at 8:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.