Git won't update a directory
I have a nicely functioning git repo on Bitbucket.org.
However I have one directory that doesn’t seem to be under my repo’s control.
Whenever I push changes, anything in that directory is left behind. If I clone the repo into a new location, that directory shows up, but it’s empty.
I think the directory contents were lifted from another project, probably in another git repo (I’m not the one coding this particular little bit of the project) – perhaps that’s connected?
When I view the listing of this section of the repo in Bitbucket, that directory displays thus:
commerce_shipworks → eb549bd63c0b [eb549bd63c0b]
Does this mean it’s pointing to some other branch that I am not connected to?
Bottom line – how can I regain control of this batch of code?
Any help appreciated.
One Solution collect form web for “Git won't update a directory”
It looks like this is a submodule, or “accidental” submodule.
If not, it’s likely an accidental submodule, meaning where somebody did a
git clone into a subdirectory, and didn’t remove the
From this website:
Here is what you need to do in order to remove the submodule and add
as a subfolder:
git rm --cached subfolder git add subfolder git commit -m "Enter message here" git push
Now the origin should be able to see the contents of the subfolder.