1- # Oops - Git-Style Single File Versioning
1+ # Oops - Simple File Versioning for Everyone 🎯
22
3- ** Familiar Git commands, simplified for single files. **
3+ ** Oops! Made a mistake? No worries - you can always go back! **
44
5- A single binary with zero dependencies. No Git, no Node.js, no runtime required.
5+ A single binary with zero runtime dependencies. Git-powered but Git-knowledge not required.
66
77## Installation
88
@@ -12,92 +12,135 @@ go install github.com/iyulab/oops@latest
1212
1313Or download from [ GitHub Releases] ( https://github.com/iyulab/oops/releases ) .
1414
15+ > ** Requires** : Git installed on your system
16+
1517## Quick Start
1618
1719``` bash
18- oops track config.txt # Start versioning
19- vim config.txt # Edit with any editor
20- oops commit " updated" # Save checkpoint
21- oops diff # See changes
22- oops checkout 1 # Go back if needed
20+ oops start essay.txt # 👀 Start versioning
21+ # ... write something ...
22+ oops save " first draft" # 📸 Save a snapshot
23+ # ... edit more ...
24+ oops save " added conclusion" # 📸 Save another
25+ oops history # 📜 View all snapshots
26+ oops oops! # ↩️ Made a mistake? Go back!
2327```
2428
2529## Commands
2630
31+ ### Friendly Commands (Recommended)
32+
2733| Command | Description |
2834| ---------| -------------|
29- | ` oops track <file> ` | Start versioning (creates version 1) |
30- | ` oops commit [message] ` | Create next version |
31- | ` oops checkout <version> ` | Navigate to version (` -f ` to force) |
32- | ` oops diff [version] ` | Show changes |
33- | ` oops log ` | Show version history |
34- | ` oops status ` | Show current state |
35- | ` oops list ` | List tracked files |
36- | ` oops untrack ` | Stop tracking |
35+ | ` oops start <file> ` | 👀 Start versioning a file |
36+ | ` oops save [message] ` | 📸 Save a snapshot |
37+ | ` oops back <N> ` | ⏪ Go back to snapshot #N |
38+ | ` oops oops! ` | ↩️ Undo (restore last saved state) |
39+ | ` oops history ` | 📜 View all snapshots |
40+ | ` oops changes ` | 🔍 See what changed |
41+ | ` oops now ` | ℹ️ Show current status |
42+ | ` oops files ` | 📁 List tracked files |
43+ | ` oops done ` | 🗑️ Stop versioning |
44+
45+ ### Developer Aliases
46+
47+ If you're familiar with Git, these work too:
48+
49+ | Friendly | Git-style |
50+ | ----------| -----------|
51+ | ` start ` | ` track ` |
52+ | ` save ` | ` commit ` |
53+ | ` back ` | ` checkout ` |
54+ | ` history ` | ` log ` |
55+ | ` changes ` | ` diff ` |
56+ | ` now ` | ` status ` |
57+ | ` done ` | ` untrack ` |
3758
3859## Examples
3960
4061### Basic Workflow
4162
4263``` bash
43- oops track notes.md # Version 1
44- # ... edit ...
45- oops commit " first draft " # Version 2
64+ oops start notes.md # Snapshot #1 created
65+ # ... write ...
66+ oops save " brain dump " # Snapshot # 2
4667# ... edit ...
47- oops commit " revisions " # Version 3
68+ oops save " organized thoughts " # Snapshot # 3
4869```
4970
50- ### Compare Versions
71+ ### Oops! Moments
5172
5273``` bash
53- oops diff # Working file vs current version
54- oops diff 1 # Working file vs version 1
55- oops diff 1 3 # Version 1 vs version 3
74+ # Accidentally deleted important text?
75+ oops oops! # Restores to last saved state
76+
77+ # Want to see an older version?
78+ oops back 1 # Go to snapshot #1
79+ oops back 3 # Jump back to snapshot #3
5680```
5781
58- ### Navigation
82+ ### See What Changed
5983
6084``` bash
61- oops log # See all versions
62- oops checkout 2 # Jump to version 2
63- oops checkout -f 1 # Force checkout (discard uncommitted changes)
85+ oops changes # Unsaved changes vs last snapshot
86+ oops changes 1 # Current vs snapshot #1
87+ oops changes 1 3 # Compare snapshot #1 and #3
6488```
6589
66- ### Branching from Past
90+ ### Check Status
6791
6892``` bash
69- # At version 10, go back to version 2
70- oops checkout 2
71- # ... edit ...
72- oops commit " new direction" # Creates version 11 (from v2)
93+ oops now
94+ # 📄 File: notes.md
95+ # 📍 Snapshot: #3 (latest)
96+ # ✏️ Status: Modified
97+ #
98+ # You have unsaved changes
99+ # oops save Save your changes
100+ # oops oops! Undo changes
73101```
74102
75- All versions preserved. No data loss.
76-
77103## How It Works
78104
79- Versions stored in ` .oops/ ` alongside your file :
105+ Oops uses Git under the hood, but hides all the complexity :
80106
81107```
82108project/
83- ├── config.txt
109+ ├── notes.md
84110└── .oops/
85- └── {hash}/
86- ├── meta.json
87- └── versions/
88- ├── 1
89- ├── 2
90- └── 3
111+ └── notes.md.git/ ← Git repository (hidden)
91112```
92113
93- Automatically added to ` .gitignore ` if present.
114+ - Each snapshot = Git commit + tag (v1, v2, v3...)
115+ - Full Git delta compression for storage efficiency
116+ - Works completely offline, no server needed
117+ - ` .oops/ ` automatically added to ` .gitignore `
94118
95119## Use Cases
96120
97- ** Good for** : Config files, scripts, documentation, notes
121+ ** Perfect for:**
122+ - 📝 Writers - essays, articles, manuscripts
123+ - 📊 Researchers - notes, data files
124+ - ⚙️ Config files - when you need quick rollback
125+ - 📋 Any single file you edit frequently
126+
127+ ** For multi-file projects:** Use Git directly
128+
129+ ## Comparison
130+
131+ | Feature | Oops | Git |
132+ | ---------| ------| -----|
133+ | Learning curve | 5 minutes | Hours |
134+ | Commands to learn | ~ 5 | ~ 20+ |
135+ | Single file focus | ✓ | Multi-file |
136+ | Server required | No | Optional |
137+ | Storage efficiency | Git-level | Git |
138+ | Undo mistakes | ` oops oops! ` | ` git checkout HEAD -- file ` |
139+
140+ ## Why "Oops"?
98141
99- ** Not for ** : Multi-file projects, binary files, team collaboration → use Git
142+ Because everyone makes mistakes when editing files. With Oops, you can simply say "oops!" and go back to a safe state. No complex commands, no fear of losing work.
100143
101144## License
102145
103- MIT
146+ MIT
0 commit comments