Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7540015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:32:02+00:00 2026-05-30T07:32:02+00:00

I’m quite new to Git: I come from SVN and there I found really

  • 0

I’m quite new to Git: I come from SVN and there I found really powerfull the :external feature. Here in Git I haven’t find something similar:

  • submodules are perfect for adding project modules that are not always required. They must be initialized after the repo cloning and you can’t include only a subdir of the original project.
  • subtrees are really good for adding libraries (they also allow subdir inclusion), but pushing them is a real pain.

So the scenario is this: I have a project, in which I want to include some libraries. I want the possibility to change all these libraries and pushing them in their own repos. Moreover some of this libraries are subdirs of bigger projects (for example if a project includes also demos or readme files, I won’t include those dirs in my project).

How can I do that?

I’ve tried:

  • http://progit.org/book/ch6-7.html + http://posterous.timocracy.com/git-sub-tree-merging-back-to-the-subtree-for (merging only a subdir isn’t allowed, or I can’t just see it);
  • http://www.tipstank.com/2011/02/21/git-subtree-notes-and-workflows/ (same as above, do not handle subdir inclusion);
  • http://psionides.eu/2010/02/04/sharing-code-between-projects-with-git-subtree/ (can’t see nothing about pushing);
  • http://h2ik.co/2011/03/having-fun-with-git-subtree/ (can’t see nothing about pushing)

Well, if you’ve reached this point, thanks for your patience, now I’d like something else to try, because right now my conclusion is: “subtree pushing isn’t allowed in Git” ç_ç

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T07:32:04+00:00Added an answer on May 30, 2026 at 7:32 am

    Couple of remarks from the comments:

    • git submodules are different from svn external
    • any modification done to a submodule can be push to its own remote repo.
    • “Planning repository layout for git migration” illustrate that you cannot always use submodules directly as the directory structure wouldn’t be exactly what you need.

    So I recommend:

    • loading (git checkout) the parent repo and all its submodules
    • creating elsewhere the correct structure, with symlink to the submodules (or subdirectories of the submodules in order to achieve what you need.
    • go back periodically to the git ain parent repo in order to detect any changes (dones from the other directory structure created outside of Git) in order to commit and push all submodules modifs, and then commit and push the parent repo.

    git checkout

    parent repo
      +
      +--> main project
        +
        +-> mainDir1
        +-> mainDir2
      +--> lib1
        +
        +-> lib1Dir1
        +-> lib1Dir2
      +--> lib2
        +
        +-> lib2Dir1
        +-> lib2Dir2
    

    And your own project directory structure (for instance)

      +--> main project (symlink to ../parent/main project)
        +
        +-> mainDir1
        +-> mainDir2
        +-> lib1Dir1    (symlink to ../parent/lib1/lib1Dir1)
        +-> lib1Dir2    (symlink to ../parent/lib1/lib1Dir2)
        +-> lib2Dir2    (symlink to ../parent/lib1/lib2Dir2)
    

    (note there is no lib2Dir1 (for instance) because in your actual project you don’t need it)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I know there's a lot of other questions out there that deal with this
I am currently running into a problem where an element is coming back from
Does anyone know how can I replace this 2 symbol below from the string
I have a view passing on information from a database: def serve_article(request, id): served_article

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.