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
A Git utility for managing work-in-progress changes across branches with super powers! 🦸♂️
4
4
5
-
Git stash with super powers! A dev tool to simplify working with work in progress changes that acts as a sub command for git.
5
+
## Features
6
6
7
-
When saving your work it creates a temporary WIP branch (pushes to remote by default) that stores your changes and allows you to restore them later. It even keeps track of which branch you were working on and which files were staged and untracked.
7
+
- 🔄 Save WIP changes to a dedicated branch
8
+
- 📋 List all your WIP branches
9
+
- ⚡ Restore WIP changes back to their original branches
10
+
- 🔒 Thread-safe and async operations
11
+
- 🌟 Maintains file states (staged, unstaged, untracked)
12
+
- 🔍 Smart branch naming with username and timestamps
13
+
- 🌐 Supports both local and remote operations
8
14
9
15
## Installation
10
16
11
-
Coming soon!
12
-
13
-
Download the latest binary for your platform under releases and put it in your executable paths.
17
+
Binary releases and automatic publishing to package repositories are coming soon!
14
18
15
19
## Build and install from sources
16
20
@@ -21,19 +25,57 @@ To install, follow these steps:
21
25
1. Install [Rust and cargo](https://www.rust-lang.org/tools/install).
22
26
2. Clone this repository.
23
27
3. Navigate to the project directory and run `cargo build -r`.
24
-
4. Copy `git-wippy` binary from `target/release` to somehwere that is in your executable paths.
28
+
4. Copy `git-wippy` binary from `target/release` to somewhere in your executable paths.
25
29
26
30
## Usage
27
31
28
32
When `git-wippy` is located somewhere in your executable paths it can be used as a `git` subcommand.
29
33
30
-
Executed with `git wippy <command>`:
34
+
### Commands
35
+
36
+
```bash
37
+
# Save your WIP changes (pushes to remote by default)
38
+
git wippy save
39
+
40
+
# Save changes locally only
41
+
git wippy save --local
42
+
43
+
# List all your WIP branches
44
+
git wippy list
45
+
46
+
# Restore changes from a WIP branch
47
+
git wippy restore
48
+
```
49
+
50
+
## How It Works
51
+
52
+
1.**Saving Changes**:
53
+
54
+
- Creates a WIP branch named `wip/{username}/{timestamp}`
55
+
- Preserves the state of all files (staged, unstaged, untracked)
56
+
- Stores metadata about the source branch
57
+
- Optionally pushes to remote
58
+
59
+
2.**Listing Changes**:
31
60
32
-
-`restore`: Restore your WIP changes
33
-
-`save`: Save your WIP changes (use `--local` flag to only save locally)
34
-
-`list`: List all WIP branches
61
+
- Shows all WIP branches for the current user
62
+
- Filters branches matching `wip/{username}/*`
63
+
- Handles both local and remote branches
35
64
36
-
## Contributing
65
+
3.**Restoring Changes**:
66
+
- Retrieves changes from the WIP branch
67
+
- Recreates the original file states
68
+
- Returns to the source branch
69
+
- Cleans up the WIP branch
70
+
71
+
## Development
72
+
73
+
### Requirements
74
+
75
+
- Git 2.0+
76
+
- Rust 1.70+
77
+
78
+
### Contributing
37
79
38
80
If you want to contribute to this project, please follow these steps:
39
81
@@ -43,6 +85,23 @@ If you want to contribute to this project, please follow these steps:
43
85
4. Push your changes to your fork.
44
86
5. Create a pull request.
45
87
88
+
```bash
89
+
# Run tests
90
+
cargo test
91
+
92
+
# Build release version
93
+
cargo build -r
94
+
95
+
# Install locally
96
+
cargo install --path .
97
+
```
98
+
99
+
## Acknowledgments
100
+
101
+
- Built with Rust 🦀
102
+
- Uses [tokio](https://tokio.rs/) for async operations
103
+
- Uses [clap](https://clap.rs/) for CLI argument parsing
104
+
46
105
## License
47
106
48
-
This project is licensed under [MIT](./LICENSE).
107
+
This project is licensed under the [MIT License](./LICENSE).
0 commit comments