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\$

1 Answer 1

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\$
1
  • \$\begingroup\$ Ah, it does seem to work it out after I commit. \$\endgroup\$
    – jzx
    Commented Feb 19, 2016 at 10:10

You must log in to answer this question.

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