1

I believe I understand how submodule work, but in my case I don't want to push it to my main repo as a simple reference to the remote repo, I want to push every content in the submodule to my main repo as well.

Is there a good way to do it?

Edit------------ here is my situation, perhaps Im approaching it the wrong way so hopefully there is a better approach:

super_repo

|--- some folders

|--- sub repo

|--------- some folders inside the sub repo that should be updated with the super repo

(well, just think of it like this: my project uses a certain framework that has some template folders etc inside itself)

mr1031011
  • 3,574
  • 5
  • 42
  • 59
  • A submodule is by definition stored in the parent repository as a reference to a particular commit, and a default URL to clone the submodule from. That's all there is to it. If you can explain your actual goals (what these repos represent, what you need to do with them) someone might be able to answer your question, though. – Cascabel Jan 18 '12 at 04:22
  • you are right, I updated my question with more info to clarify my reason – mr1031011 Jan 18 '12 at 09:42

1 Answers1

1

"push every content in the submodule to my main repo as well" is a bit like merging two repos together.

That is call subtree merging: see "How do you merge two git repositories?"

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250