549 questions
6
votes
1
answer
272
views
Creating git subtree repo that can import Python files as from "fake" namespace
tl;dr: What are the minimal changes needed to make a standalone folder work in Python runtime, and get modules resolved in VS Code, as though it's part of a parent module namespace? Simple example at ...
2
votes
0
answers
108
views
git subtree seems to be broken, I get a segfault
At my company we a have large "bundle" repository with many sub-projects combined (for historic reasons). There a sub-projects (let's call it projA) for which I have a standalone repository. ...
1
vote
1
answer
85
views
git subtree - merge the whole subrepository with multiple subfolders into the main repository
I have read and used git subtree functionality a lot.
Especially are useful these links
Add subdirectory of remote repo with git-subtree
If I have main repo:
base/folder1
base/folder2
And I have sub ...
0
votes
0
answers
22
views
Issue accessing components in Git subtree - Error: Cannot find module
I am encountering an issue while trying to access a component from a Git subtree in my Svelte project. Here’s a simplified view of my project structure:
root
- .subtree
- imports
- ui
- ...
1
vote
0
answers
47
views
Integrating Specific Subfolder from One Git Repository into Another Without Full Clone
I'm currently working on a project where I need to integrate a specific subfolder (folder F) from a repository (RepoA) into another repository (RepoB). I tried using git subtree and submodules, but ...
1
vote
0
answers
85
views
Git use a worktree as a submodule
I have a git repository that I would like to reuse in another project as a library.
So I have this kind of library (Lib A) that has quite a lot of branches for different configurations and I want to ...
1
vote
0
answers
70
views
Show Git subtree commit history when --squash option was used
Is there any way to show only subtree history, like with git log but filtering only specific subtree's related commits?
When I add a subtree with --squash option only a merge commit is shown, but the ...
1
vote
0
answers
230
views
How to fix git subtree rev-parse split issue
I am using SourceTree to interact with branches.
Also, my git knowledge is extremely limited
I have a NAV-482 branch (/nav.git repository). Subtree branch is NAV-482-DLL (/nav.dll.git repository). ...
0
votes
1
answer
129
views
Git Interactive Rebase to Split Commit With Subtree
I have the following git history:
| Merge (HEAD)
|\ SubTree Add (Squashed)
| ** Git Commit I need to Split Into Two Commits **
| Git Commit 1
I am trying to clean up my git history a bit ...
0
votes
1
answer
580
views
How to solve git subtree invalid path
I am trying to migrate to a monorepo keeping the history, after some research, looks like the ideal tool is git subtree.
I think I misunderstood something about git subtree, I hope any of you could ...
0
votes
0
answers
51
views
how can i fix import error for git subtree
I'm currently researching subtree-related issues
I added the B repository as a subtree to the A repository by creating a folder named B
However, when importing modules from the subtree, I encounter ...
0
votes
1
answer
174
views
nested but communicating git repositories
let upper, left, and right be directories as in the following diagram.
upper
├── left
└── right
question
how do i best manage these with git as local git repositories such that
each upper, left and ...
0
votes
1
answer
252
views
Git - assertion failed on push to subtree repository
My situation is simple - I have a parent repository with a subtree nested in a subdirectory. Originally, these were two separate repos (i.e. I did not use the subtree split tool). I created the ...
1
vote
1
answer
314
views
Confused about what Visual Studio 2022 is doing with Git Subtree
Currently using Visual Studio 2022 17.4.4. I have a Git repo that contains a subtree folder. Within Visual Studio, the Git Changes window shows two repositories - one for the main repo and another ...
0
votes
0
answers
436
views
How to clone only a specific folder when doing git subtree?
I'm trying to utilize git subtree to add another repo into my existing repo. Problem is I don't want all the files from the repo. I only want to clone the files within a specific folder.
So for ...
1
vote
0
answers
90
views
How to switch with git subtree to a different branch for one of the subtree projects
When I have a container project with bunch of git subtree directories, each tracking their respective main, how can I switch (and even create) a branch in one of the subtrees?
The setup being:
.\...
1
vote
1
answer
814
views
Fixing a git subtree with a bad split
I have a git repo with a subtree that was set up years ago with a bad split commit that's throwing errors when I try to do a git subtree push. The error I get looks something like this:
git push using:...
1
vote
1
answer
125
views
How to undo all local changes to subtree?
How do I undo all local changes to a subtree and replace everything with the remote commit?
git subtree pull --prefix repo https://github.com/repo/repo.git main --squash
0
votes
0
answers
102
views
Git subtree split: how to save merges history?
I used
git subtree split
to split directory of my repository with this article: https://shantanoo-desai.github.io/posts/technology/git_subtree/. It worked good with standard commits but all merge ...
1
vote
1
answer
275
views
git: merging commits from remote repository into subtree following renaming
So I've used git subtree strategy to incorporate a repository branch into another as a subdirectory.
First I used git subtree add -P some/dir1 myremote dev.
Then I renamed the subtree directory to ...
0
votes
1
answer
328
views
What is the technique/process for doing a temporary git checkout into another directory of the current checkout without messing up my current checkout
The scenario is that I'm in the middle of a task, in a feature branch, and then I've been asked to do a quick hot fix, or do some tests on another branch.
And so, one approach is to close up my ...
-1
votes
1
answer
93
views
Rebase into a subtree
The situation is that we have two repositories, parent and child.
The parent repo has the child repo as a subtree:
parent/
child/
After some time, the child repository has diverged from its ...
0
votes
0
answers
26
views
Unable to Access DB directory while implementing subtrees in a rails application
I have seperated the models and DB directory to a separate shared repository from the source application repository in order to use this shared repostory as a library/shared directory with other ...
3
votes
1
answer
1k
views
git subtree to add the files directly under root folder
I want to add a source repo B into a target repo A directly under the parent folder 'application' of A by using:
git subtree add --prefix=application <remote name of B> <branch name of B>
...
1
vote
0
answers
36
views
Customize git subtree merge
I'm trying to merge a sub-repo into a main-repo in GIT.
my sub-repo file explorer
While doing the merge, I'm providing a specific folder for each of my sub-repo files & folders, for example my ...