Is there a way to automatically have git submodule update (or preferably git submodule update –init called whenever git pull is done? Looking for a git config setting, or a git alias to help with this.
We are moving our (huge) project to git and we are thinking about using submodules. Our plan is to have three different heads in the superproject: release,stable,latest. The project leads will handle the release and stable branches. They will move the submodules as required. The issue is the “latest” head. We would like the superproject […]
How do I remove a Git submodule? By the way, is there a reason I can’t simply do git submodule rm whatever ?
I have a project that used to contain a submodule, at path mysubmodule. I installed the latest Git from source (1.8.3-rc2) and ran git submodule deinit mysubmodule. I then deleted the .gitmodules file and committed the change. I also deleted the .git directory from the mysubmodule folder. I’d like to commit the files from mysubmodule […]
I’m trying to put a submodule into a repo. The problem is that when I clone the parent repo, the submodule folder is entirely empty. Is there any way to make it so that ‘git clone parent’ actually puts data in the submodule folder? example: http://github.com/cwolves/sequelize/tree/master/lib/ nodejs-mysql-native is pointing at an external git, but when […]
How does git submodule add -b work? After adding a submodule with a specific branch, a new cloned repo (after git submodule update –init) will be at a specific commit, not the branch itself (git status on the submodule shows “Not currently on any branch”). I can’t find any information on .gitmodules or .git/config about […]
I have a project with a submodule that is pointing to an invalid commit: the submodule commit remained local and when I try to fetch it from another repo I get: $ git submodule update fatal: reference is not a tree: 2d7cfbd09fc96c04c4c41148d44ed7778add6b43 Unable to checkout ‘2d7cfbd09fc96c04c4c41148d44ed7778add6b43’ in submodule path ‘mysubmodule’ I know what the submodule […]
See below the solid line for my original question. I have a folder in my local directory that is untracked. When I run git status, I get: Changed but not updated: modified: vendor/plugins/open_flash_chart_2 (modified content, untracked content) When I type git add vendor/plugins/open_flash_chart_2 then try git status again, it still says untracked. What’s going on? […]
Note: while the use-case described is about using submodules within a project, the same applies to a normal git clone of a repository over HTTP. I have a project under Git control. I’d like to add a submodule: git submodule add http://github.com/jscruggs/metric_fu.git vendor/plugins/metric_fu But I get … got 1b0313f016d98e556396c91d08127c59722762d0 got 4c42d44a9221209293e5f3eb7e662a1571b09421 got b0d6414e3ca5c2fb4b95b7712c7edbf7d2becac7 error: Unable […]
If I modify a submodule, can I push the commit back to the submodule origin, or would that require a clone? If clone, can I store a clone inside another repository?