Accidentally Adding a Git Submodule

Git LogoRecently I’ve been working on a Drupal project at work and a fellow co-worker wanted to piggy-back resources on a similar project. He sent me over the code for a custom module I was going to use on the project.

Only after committing and pushing the folder from my local git repo to the origin server did I notice the remnants of my co-workers .git folder. This cause git to treat the subfolder as a git submodule and ignore the contents of the subfolder as I push my project to the origin server.

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.

Lunch & Learn: Managing Content on the Princeton Web

During the past decade, Princeton’s web site has grown from a relatively simple tool supporting producers and consumers of information about the institution, its programs, and its people to what is today a complex, mission-critical appliance for teaching, research, administration, and collaboration.

Such complex web sites publish and sustain every day vast amounts of time sensitive information. To manage the mountain of content, Princeton has turned to Content Management Systems that offer an integrated set of powerful features for creating, storing, versioning, and publishing everything from news articles and brochures though audio, video, and images.

Read more…