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

  • Home
  • SEARCH
  • 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 968481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:29:15+00:00 2026-05-16T02:29:15+00:00

I need something akin to submodules, but which exist outside the main repository as

  • 0

I need something akin to submodules, but which exist outside the main repository as a dependency.

Here’s the problem:

I’m trying to use Git (in a REALLY awkward way) to manage design files for a CAD tool (Cadsoft Eagle), and I’m having a hard time figuring out if there is a way to use git submodules to manage each project’s dependency upon the CAD tool’s shared library.

I’m using a folder structure like this:

~/eagle/ <-- Main library used by multiple projects
    .git/     
    <library files>

~/projects/ <-- Projects folder
    Proj0/
        .git/
        <design files>
    Proj1/
        .git/
         <design files>

In this case, it doesn’t make sense to add the eagle.git repository as a git submodule for each project.

However, I still need a way to snapshot the current state of the “eagle.git” repository so that if the library is updated in the future, it can be rolled back to access the specific revision of the library files which were being used when the Proj[x] was committed.

Ideally, I’d like something like the following:

~/eagle/ <-- Main library used by multiple projects
    .git/     
    <library files>

~/projects/ <-- Projects folder
    Proj0/
        .git/
        <design files>
        **eagle** <-- something that acts like a submodule  
                      but which actually points to ~/eagle/
    Proj1/
        .git/
         <design files>
         **eagle** <-- something that acts like a submodule  
                       but which actually points to ~/eagle/

I’d like to be able to:

cd ~/projects/Proj0
git submodule update

and have the ~/eagle/ directory automatically roll back to the revision checked into Proj0.

Anybody know of anything in Git that could allow for this kind of behavior?

  • 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-16T02:29:16+00:00Added an answer on May 16, 2026 at 2:29 am

    For each project, add .git/hooks/pre-commit (and make sure it’s executable):

    #!/bin/sh
    git --git-dir=~/eagle/.git log -1 --pretty=format:%H >.eagle_rev
    git add .eagle_rev
    

    Then, for each project:

    git config alias.update-eagle '!git --git-dir=~/eagle/.git --work-tree=~/eagle checkout -q $(<.eagle_rev)'
    

    When you make a commit, it will record the current HEAD of ~/eagle, and git update-eagle will check out that commit in ~/eagle. (Then just make sure you git checkout <branch> in ~/eagle before you make any changes to it.)

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

Sidebar

Related Questions

I know about SortedSet , but in my case I need something that implements
Basically, what I need is something like Dependecy Walker , but it should work
I have something akin to <Foobar Name='Hello There'/> and need to change the single
I have to write something in vbscript that need to use a unique set.
i have a input tag which is non editable, but some times i need
I'm using vb.net. Usually I used the SQL Server SQLComamnd but here I need
I need something like the slider control from jQueryUI, but I don't want to
I need something that can provide the information GetFontUnicodeRanges provides, but I can't find
I need something in between a full text search and an index search: I
I need something that takes a directory's contents and then proceeds to generate an

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.