You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Design Document: Git Integration Rework for Programmer
2
+
3
+
## Overview
4
+
This document outlines the proposed changes to the Git integration feature of the `programmer` tool. The goal is to allow real-time edits in the user's working state while maintaining a separate commit history in a `programmer-<session>` branch, without affecting the user's visible working state.
5
+
6
+
## Objectives
7
+
- Allow users to see changes in real-time using tools like VSCode's Git view.
8
+
- Maintain a separate commit history in the background in a `programmer-<session>` branch.
9
+
- Avoid using stash or switching the HEAD, ensuring the user's working state remains unchanged.
10
+
11
+
## Proposed Solution
12
+
To achieve the above objectives, we propose the following solution:
13
+
14
+
### Session Branch Management
15
+
1.**Initialization**: At the start of a session, initialize a `programmer-<session>` branch based on the current state of the user's branch.
16
+
17
+
2.**Change Tracking**: Monitor file changes in the working directory to reflect them in the session branch, keeping the user's current branch and working directory unchanged.
18
+
19
+
3.**Commit History**: Maintain a separate commit history in the `programmer-<session>` branch to allow for session management and review without interfering with the user's workflow.
20
+
21
+
## Benefits
22
+
- Users can continue using their preferred development tools and see live changes.
23
+
- Maintains a clean separation of session history, enabling better session management and review.
24
+
25
+
## Challenges
26
+
- Requires careful handling of Git's internal mechanisms to ensure seamless integration.
27
+
28
+
## Conclusion
29
+
By leveraging a separate session branch, we can achieve seamless integration of the `programmer` tool with the user's workflow, providing real-time feedback and maintaining a comprehensive session history without disrupting the user's development environment.
0 commit comments