Xiv
Xiv

Reputation: 10043

Folder labelled submodule in Github erroneously

There is a problem I'm having. We have a github setup for a group project. One of the folders in the git repo is a web app with its own heroku deployment, and therefore its own .git. Github always marks this file green, and I have no idea how to convert it from a git submodule to just an ordinary folder.

I tried adding the /path/.git to .gitignore but it didn't help.

Thanks for your help!

Upvotes: 1

Views: 374

Answers (2)

Xiv
Xiv

Reputation: 10043

The solution lies in adding them as submodules to git. Info found here: http://git-scm.com/book/en/Git-Tools-Submodules.

You need to go to the home directory, and do:

git submodule add git://github.com/<something>.git <name>

Then later, when you pull your directory, you can have it recusrively pull all the submodules also with:

git submodule init
git submodule update

Upvotes: 1

Bleeding Fingers
Bleeding Fingers

Reputation: 7129

It appears that repo submodules are displayed in green on github's website. Not saying this through practical experience though, since I have never created a github repo containing submodules, but through observation.

Source this, this and this.

Upvotes: 0

Related Questions