How to track untracked content?

You have added vendor/plugins/open_flash_chart_2 as “gitlink” entry, but never defined it as a submodule. Effectively you are using the internal feature that git submodule uses (gitlink entries) but you are not using the submodule feature itself. You probably did something like this: git clone git://github.com/korin/open_flash_chart_2_plugin.git vendor/plugins/open_flash_chart_2 git add vendor/plugins/open_flash_chart_2 This last command is the problem. … Read more

git submodule tracking latest

Edit (2020.12.28): GitHub change default master branch to main branch since October 2020. See https://github.com/github/renaming This answer below still reflect the old naming convention. Update March 2013 Git 1.8.2 added the possibility to track branches. “git submodule” started learning a new mode to integrate with the tip of the remote branch (as opposed to integrating … Read more

Git will not init/sync/update new submodules

I had this same problem – it turned out that the .gitmodules file was committed, but the actual submodule commit (i.e. the record of the submodule’s commit ID) wasn’t. Adding it manually seemed to do the trick – e.g.: git submodule add http://github.com/sciyoshi/pyfacebook.git external/pyfacebook (Even without removing anything from .git/config or .gitmodules.) Then commit it … Read more

How can I have linked dependencies in a git repo?

You can do this with submodules in git. In your repository, do: git submodule add path_to_repo path_where_you_want_it So, if the library’s repository had a URL of git://github.com/example/some_lib.git and you wanted it at lib/some_lib in your project, you’d enter: git submodule add git://github.com/example/some_lib.git lib/some_lib Note that this needs to be done from the top-level directory in … Read more