Skip to content

Commit 4adc332

Browse files
committed
chore: Backup local Module-Data-Groups before subtree re-initialization
1 parent 1f368a9 commit 4adc332

20 files changed

Lines changed: 17 additions & 3770 deletions

File tree

git-subtree-repo-issue.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
I am currently working on a feature branch within my main Git repository, which I refer to as the 'labyrinth' project. My principal objective is to establish and correctly maintain a completely separate project—a **Git Subtree**—inside a specific directory: `projects/code-your-future/Module-Data-Groups`.
2+
3+
**The Key Problem I Created (The 'Dirty' Commit):**
4+
My fundamental issue arose when I incorrectly packaged my work. I was preparing my Sprint 2 code for a Pull Request, but I mistakenly included file changes and commits that actually belonged to a completely separate assignment, Sprint 3. As a result, my feature branch history contained code for *both* sprints, which is simply unacceptable for the Sprint 2 Pull Request.
5+
6+
**The Fix and The Clean-up:**
7+
To resolve this, I performed a complex operation: an **interactive rebase**. This is essentially an advanced 'undo' facility that allows one to rewrite history.
8+
* I successfully edited the past commits to surgically **remove all traces of the Sprint 3 files and changes**.
9+
* This also included sorting out other temporary files and the directory I had created for backup (`...-BACKUP`).
10+
11+
**The Current Situation (The Structural Damage):**
12+
Whilst my *commit history* is now clean of the Sprint 3 files, the process broke the physical structure of my repository.
13+
1. **Misplaced Files:** Key module components, such as the `Sprint-2` directory, were unintentionally moved from their correct subfolder location and dumped directly into the **root** of my main 'labyrinth' repository.
14+
2. **Missing Files:** Other necessary framework files for the module (like the main `package.json` or `README.md`) were completely deleted during the rebase process.
15+
16+
**The Critical Constraint:**
17+
I cannot simply update the module by pulling from its original source (the remote repository). The remote branch itself is 'dirty'—it contains Sprint 3 code and modifications that I was specifically trying to remove. Pulling from it would only re-introduce the problem.

0 commit comments

Comments
 (0)