- Deleted the subfolder's .git directory
- Removed the submodule from the outer repository's Git index with git rm --cached theFolder
- Committed the change
- Added the subfolder back, now as a plain directory, with git add theFolder
- Committed the change
Various technical articles, IT-related tutorials, software information, and development journals
Monday, April 27, 2020
Nested Git repositories can appear as phantom submodules
Tonight I helped a student who was trying to publish a project to GitHub with Android Studio but only got one subfolder in the resulting GitHub repository. git status showed that the published subfolder was a submodule with pending changes. Strangely, there was no .gitmodules file for submodule registration. There was, however, another .git directory inside that folder - it was actually a nested repository. To fix that accident, we:
Labels:
misc
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment