3
\$\begingroup\$

I'm attempting to rearrange a Unity project that is under source control. Two problems:

  • In order to maintain the relationships between assets, I need to use Unity's API or interface. But when I move something that way, git loses track of them.
  • In order to maintain git tracking, I need to use git commands. But when I move them that way, Unity loses track of how they're related.

Is there an easy way for me to tell one what the other is doing?

\$\endgroup\$
3
\$\begingroup\$

I would always use the unity tools to modify unity projects, since in the end i want a working game and not just a nice git history.

From my experience git is pretty smart about understanding your moves and renames from the delete/add pairs of nearly identical files, but these only show up once you stage your changes with git add. Also make sure no one else works on the repository while you move things are, you might get nasty conflicts otherwise.

The good thing about using git is you can just go ahead and try a small refactoring in unity to see how git would manage it. If you don't like the result, rollback to the last commit.

\$\endgroup\$
  • \$\begingroup\$ Ah, it does seem to work it out after I commit. \$\endgroup\$ – jzx Feb 19 '16 at 10:10

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.