[Deprecated] Unity extensions as git submodules

If you want to use any of the extensions available on my Github page you can simply download the zip package and add it to your project. But what if you want to contribute back or download latest updates? Well, you can add the extension to your project as a git submodule.

Here’s an introduction to the git submodules: http://blogs.atlassian.com/2011/12/git-submodules/

Here’s what you’ll need to know once start working with submodules: http://blogs.atlassian.com/2013/03/git-submodules-workflows-tips/

And a how to do submodules in SourceTree: https://blog.sourcetreeapp.com/2012/02/01/using-submodules-and-subrepositories/

Detailed info: http://git-scm.com/book/en/v2/Git-Tools-Submodules

QuickStart tutorial

Let’s add the AnimationPath Animator extension to our project:

  1. Fork the repository from the Github page:
    Github_fork
  2. Go to your fork and copy the repository address:
    Repo_page-copy_address
  3. Open you project repo in SourceTree.
  4. Open Repository->Add Submodule.
  5. Paste the repo address and select destination path (create a new AnimationPathAnimator folder):
    ST_add_submodule
  6. Press OK. You’ll find your new submodule in the submodule section.
    ST_submodules

Before working with submodules you should read articles linked above. But the two most important rules are:

  • First commit changes made to your submodes (if any) and then commit to the main project.
  • Always have all changes to your submodules committed before making submodule update.

That’s all, have fun and try not to lose any work in the process.

Leave a comment