- Simplified README.md by moving detailed command docs, workflows, and development info to dedicated user-guide/ and developer-guide/ directories. - Created index.md files for both guides to improve navigation. - Extracted individual command guides (e.g., chat.md, edit.md) into user-guide/ for focused, maintainable documentation. - Moved architecture, configuration, and troubleshooting to developer-guide/. - Updated README links to point to the new docs structure.
32 lines
1.2 KiB
Markdown
32 lines
1.2 KiB
Markdown
# 🛡️ Safety & Change Management
|
|
|
|
Grokkit is designed to work seamlessly with Git. Rather than creating redundant `.bak` files, we lean on Git's powerful version control to manage changes and rollbacks.
|
|
|
|
## The Safety Workflow
|
|
|
|
1. **Preview**: Every command that modifies files (like `edit`, `lint`, `docs`) shows a diff-style preview first.
|
|
2. **Confirm**: You must explicitly confirm (`y/N`) before any changes are written to disk.
|
|
3. **Git Integration**: Use Git to manage the "pre-staged," "staged," and "committed" degrees of change.
|
|
|
|
## Managing Undesired Changes
|
|
|
|
If you've applied a change that you don't like, Git makes it easy to roll back:
|
|
|
|
- **Unstaged changes**: If you haven't `git add`-ed the changes yet:
|
|
```bash
|
|
git restore <file>
|
|
```
|
|
- **Staged changes**: If you've already staged the changes:
|
|
```bash
|
|
git restore --staged <file>
|
|
git restore <file>
|
|
```
|
|
- **Committed changes**: If you've already committed the changes:
|
|
```bash
|
|
git revert HEAD
|
|
# or to reset to a previous state:
|
|
git reset --hard HEAD~1
|
|
```
|
|
|
|
By using Git, you have a complete audit trail and multiple levels of undo, ensuring your codebase remains stable even when experimenting with AI-driven refactors.
|