d-_-b
d-_-b

Reputation: 23211

How to add a repo folder to its parent folder's repo

A folder predis in my repository, is itself a git repository. I'm having trouble adding it to my repo (without its .git folder).

When I do git add predis, nothing happens. Similarly, when I do git status it does not show up.

How can I add the /predis folder, when it itself is a git repository (from someone else's repo)?

also, while looking into this, i noticed that git status --ignored doesn't work, which would have been nice to analyze this. git add -f predis does not work either.

Upvotes: 0

Views: 53

Answers (1)

snowbound
snowbound

Reputation: 1732

What @meagar said about submodules may be what you need. Issue the command:

git submodule add git:<url for submodule> path/to/save.

The git-scm book has further details: http://git-scm.com/book/en/Git-Tools-Submodules

Upvotes: 1

Related Questions