I have a project consisting of a huge amount of data. Because of its size, I can’t use a remote GIT repo and push/pull through the Internet. Instead, I carry a portable HDD with me, which contains the current state of the project (i.e. the workdir). The GIT repo of this workdir is on another HDD inside my desktop computer (I used --separate-git-dir to achieve that). From time to time, I bite the bullet, connect my external HDD to my desktop, and make another gargantuan GIT commit, in order to track the history of the project data.
The problem is that within this project, there are several small subprojects tracked by their own GIT repos. They are (relatively) lightweight, and receive commits on regular basis.
portable HDD desktop HDD
| |
|-.git <- text file (gitlink) to here -> |-ProjectGit
| | |-objects
|-project1 | |-refs
| |-.git <- actual git dir | |-HEAD
| |-some files . . ...
|
|-project2
| |-.git <- actual git dir
| |-some files
|
|-loads
|-and
|-loads
|-of
|-files
When I try to do a git add --all . inside the main superrepo, GIT understandably gets angry that there are nested .git folders and yells at me that I should use submodules. And I would love to do just that, except that submodules reside either (a) in the .git/modules folder of the superrepo, or (b) it is possible to force the legacy (outdated) mode and store the submodule inside the workdir. In case (a), I won’t have the .git folders on my external HDD and won’t be able to commit the changes in the subrepos during work; and in case (b) the superrepo’s .git folder won’t have a copy of the subrepo commits, and thus if the portable HDD gets screwed the data is lost.
I want some way to pull all commits residing within the nested subrepos into the desktop HDD each time I make a commit of the superrepo. The only way I could think of so far is to somehow use git hooks, and attach a script to them which will automatically pull all changes into several small repos residing on the desktop HDD alongside with the superrepo’s git dir.
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)