1
\$\begingroup\$

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?

\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

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.

\$\endgroup\$
3
  • \$\begingroup\$ What about all the other rubbish (all the .pdb files, .suo, etc)? They're autogenerated but do I need them? \$\endgroup\$ Commented Mar 8, 2013 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
    Commented Mar 8, 2013 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\$ Commented Mar 9, 2013 at 8:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .