cad - How to add a git repository as a shared dependency of another git repository? -
I want something like submodules, but the dependencies are present outside the main repository
< Strong> Here's the problem:
I try to use the CIT tool (to manage design files for Cadsoft Eagle) to use the guit (a very strange way) I am doing this), and to manage the dependence of each project on the CAD tool's shared library, GIT Sabewood Is there a way to use, I find difficult time.
I am using a folder structure like this:
~ / eagle /
In this case, this does not mean adding eagle.git repository to each project as a git submodule.
However, I still need a way to snapshot the current status of the "Eagle.git" repository so that if the library has been updated in the future, then it will be used when the project is committed [x] The library files being performed can be rolled back to reach specific modification.
Ideally, I want something like the following:
~ / eagle /
: I want to be able to:
The CD ~ / Project / Prose 0 GIT subdue update
and / ~ / eagle / directory automatically rolls back the revised check in ProZ0.
Any GIT knows anything that can allow for such behavior?
For each project, / hook / pre-commit (and make sure it is executable) :
#! / Bin / sh git --git-dir = ~ / eagle / .git log -1-pretty = format:% H & gt; .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 $ (& lt; .eagle_rev) '
When you commit one, then it is ~ / eagle Record the existing head, and git update-eagle
will see that ~ / eagle comments (after this you make sure that you git checkout & lt; branch before making any changes to it) & Gt;
in ~ / eagle.)
Comments
Post a Comment