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.

  • git permission denied (publickey) when verify connection
  • Git : How to get name of the branch tracked by the current one?
  • git cherry-pick branchless commit on remote
  • Expected FS format '2' found format '3 git-svn
  • why `git add -p` doesn't stage untracked files?
  • Are multiple `.gitignore`s frowned on?
  • 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.

  • Git: How to squash all commits between two commits into a single commit
  • Script for automatic commit and increase of build number
  • Customize display of git commit message display to create link to issue tracker
  • How do I remove a repository from git gui?
  • How to remove all existing git files so that i can renew my own repository without getting fatal error?
  • SSH errors when cloning Git repository
  • One Solution collect form web for “Git won't update a directory”

    It looks like this is a submodule, or “accidental” submodule.

    Is there .gitmodule file?

    If not, it’s likely an accidental submodule, meaning where somebody did a git clone into a subdirectory, and didn’t remove the .git folder.

    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.

    Git Baby is a git and github fan, let's start git clone.