mirror of
https://github.com/Dasemu/skipredictor.git
synced 2026-11-26 15:26:15 +00:00
docs: update API, deployment, and lessons for the new backend
- Updated API_SPEC.md with JWT auth and storage schema. - Updated DEPLOYMENT.md for the new uvicorn-based setup. - Added LESSONS.md pattern for worktree management. - Included new README, TODO, and OPERATIONS files.
This commit is contained in:
1 parent
b5b62e582e
commit
e952cea417
7 files changed
+281
-279
No files matched your search
+9
-8
@@ -30,25 +30,26 @@
|
||||
|
||||
**What went wrong:** Worktree creation and cleanup were mismanaged, leading to confusion between the main directory and the worktree. Changes were applied to the main directory instead of the newly created worktree, and branch deletion failed because the worktree was still active.
|
||||
|
||||
**Root cause:** Lack of a strict "switch directory" step and incorrect order in the cleanup process (trying to delete the branch before removing the worktree).
|
||||
**Root cause:** Lack of a strict "switch directory" step, incorrect order in the cleanup process, and creating worktrees outside the repository root.
|
||||
|
||||
**Prevention rule:** Before using a worktree:
|
||||
1. **Always** `cd` into the new worktree directory immediately after creation.
|
||||
2. Perform all edits and commits **inside** the worktree.
|
||||
3. To clean up:
|
||||
1. **Always** create the worktree inside a `.tmp/` directory within the repository (e.g., `.tmp/feature-name`).
|
||||
2. **Always** `cd` into the new worktree directory immediately after creation.
|
||||
3. Perform all edits and commits **inside** the worktree.
|
||||
4. To clean up:
|
||||
* Return to the main directory: `cd -`
|
||||
* Remove the worktree: `git worktree remove <path>`
|
||||
* Remove the worktree: `git worktree remove .tmp/<path>`
|
||||
* Then, and only then, delete the branch: `git branch -d <branch>`
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
# Correct flow:
|
||||
git worktree add ../new-feature -b feature-branch
|
||||
cd ../new-feature
|
||||
git worktree add .tmp/new-feature -b feature-branch
|
||||
cd .tmp/new-feature
|
||||
# ... do work, add, commit ...
|
||||
cd -
|
||||
git merge feature-branch
|
||||
git worktree remove ../new-feature
|
||||
git worktree remove .tmp/new-feature
|
||||
git branch -d feature-branch
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user