Replies: 2 comments
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
|
This isn't a GitHub server-side bug — it's standard Git behavior, and it's a very common accident. Here's what's happening: Mode Git doesn't check whether you intended a submodule. If it sees a nested
Since no How to confirm the originBefore changing anything, find the commit that introduced it: Then inspect that commit: You should see it was added with mode How to fix it```bash 1. Remove the gitlink from git's index (keeps your local files intact)git rm --cached ticketing-v2 2. If a nested .git folder still exists locally, remove itso the directory stops behaving like its own reporm -rf ticketing-v2/.git 3. Re-add the directory normally — this time git will addthe actual files instead of a commit referencegit add ticketing-v2 4. Commit and pushgit commit -m "Fix: replace stray submodule gitlink with normal directory" After this, the blue submodule icon should disappear on GitHub, the API will report Short-term CI workaround (if you can't fix the history right away)```yaml
Note this only helps if the gitlink itself isn't otherwise breaking the checkout step — worth testing first. The real fix is removing the gitlink from the tree as shown above; |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Bug
💬 Feature/Topic Area
other
Discussion Details
Hello GitHub Community,
I'm experiencing an unusual issue with a repository where GitHub appears to treat a directory as a Git submodule/gitlink, even though I did not intentionally configure it as a submodule.
Repository:
the-par3a/ticketing-v2
The repository contains an entry named:
ticketing-v2
On GitHub, this entry is displayed with the blue folder/submodule-style icon rather than as a normal directory.(like this
)
I checked the repository tree through GitHub's API and found:
"path": "ticketing-v2",
"mode": "160000",
"type": "commit",
"sha": "9be1252a062de826a9f795d9a9f28a553f3a4f2a"
GitHub's contents API also reports:
"type": "submodule"
However, there is no .gitmodules file in the repository.
The submodule information also appears incomplete because GitHub reports:
"submodule_git_url": null
This causes GitHub Actions checkout to fail during post-job cleanup with:
fatal: No url found for submodule path 'ticketing-v2' in .gitmodules
The relevant part of the Actions log is:
The process '/usr/bin/git' failed with exit code 128
fatal: No url found for submodule path 'ticketing-v2' in .gitmodules
What makes this unusual is that I did not intentionally configure ticketing-v2 as a submodule, and there is currently no .gitmodules file in the repository.
I would like to understand how this gitlink was created and whether GitHub can help determine its origin or confirm whether this is a stale/broken submodule reference.
For now, I have intentionally not modified or removed the entry because I would first like to understand exactly what happened.
Any guidance on safely diagnosing this situation would be appreciated.
Thank you!
All reactions