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
`git-cl` is a command-line tool that offers Git changelist support, inspired by Subversion. It allows users to assign working directory files to named changelists, helping organise work by intent and manage partial commits more easily.
10
+
`git-cl` is a command-line tool that offers Git changelist support, inspired by Subversion. It allows users to assign working directory files to named changelists, helping organise work by intent, manage partial commits, and create branches directly from a changelist.
12
11
13
12
Perfect for developers who prefer to organise their work logically from the start, rather than managing complex commit history afterward.
14
13
@@ -18,6 +17,7 @@ Perfect for developers who prefer to organise their work logically from the star
18
17
- Work on multiple features on a single branch
19
18
- Stage and commit changes by intent
20
19
- Stash changelists and resume work later
20
+
- Create a new branch directly from a changelist
21
21
- Local-only metadata (`.git/cl.json`)
22
22
- Simple CLI: `git cl <command>`
23
23
@@ -68,6 +68,9 @@ git cl delete docs-fix
68
68
git cl stash docs-fix
69
69
git checkout -b docs-fix-work
70
70
git cl unstash docs-fix
71
+
72
+
# Create and switch to a new branch from a changelist (auto-stash/unstash)
73
+
git cl br docs-fix
71
74
```
72
75
73
76
## Example Output
@@ -88,15 +91,10 @@ git cl unstash docs-fix
88
91
89
92
## Project status
90
93
91
-
`git-cl` is developed as a personal side project. Future updates may happen as time and interest allow, but no ongoing development or community involvement is planned.
94
+
`git-cl` is now feature complete. All planned functionality has been implemented, including changelist creation, staging, committing, stashing, and branching. Future updates will focus on code refactoring, bug fixes, and usability improvements — no major new features are planned.
92
95
93
96
Use, fork, or adapt freely under the BSD license.
94
97
95
-
96
-
## Future Ideas
97
-
98
-
Some ideas for features are outlined in [`docs/FUTURE.md`](docs/FUTURE.md).
99
-
100
98
## License
101
99
102
100
BSD 3-Clause License — see [LICENSE](./LICENSE) for details.
-[6.2 Git Status Code Reference](#62-git-status-code-reference)
33
35
34
36
</details>
35
37
@@ -334,7 +336,26 @@ git cl delete --all
334
336
335
337
Only changelist metadata is deleted — no file content or Git history is lost.
336
338
337
-
### 2.8 Stash and Unstash Changelists
339
+
### 2.8 Checkout a Changelist
340
+
341
+
```
342
+
git cl checkout <changelist-name>
343
+
# or
344
+
git cl co <changelist-name>
345
+
```
346
+
347
+
- Reverts all files in the changelist to their last committed state ([HEAD](https://git-scm.com/book/ms/v2/Git-Tools-Reset-Demystified.html#_the_head)).
348
+
- Useful for discarding local changes by intent, not just by filename.
349
+
- Prompts for confirmation before proceeding.
350
+
- Shows a summary of reverted files.
351
+
352
+
353
+
[↑ Back to top](#git-cl-a-git-subcommand-for-changelist-management)
354
+
355
+
356
+
## 3. Advanced Commands
357
+
358
+
### 3.1 Stash and Unstash Changelists
338
359
339
360
You can temporarily shelve changelists using `stash`, then restore them later with `unstash`. This is useful when switching branches or pausing work on a feature.
- Reverts all files in the changelist to their last committed state ([HEAD](https://git-scm.com/book/ms/v2/Git-Tools-Reset-Demystified.html#_the_head)).
377
-
- Useful for discarding local changes by intent, not just by filename.
378
-
- Prompts for confirmation before proceeding.
379
-
- Shows a summary of reverted files.
396
+
Creates a new branch for a changelist and restores its files there in one step.
397
+
398
+
1. Stashes all active changelists to clean the working directory.
399
+
2. Creates and checks out the new branch (defaults to <changelist> from the current branch, or use --from).
400
+
3. Unstashes only the chosen changelist onto the new branch; others stay stashed.
401
+
402
+
Preconditions:
403
+
404
+
- Changelist exists and not already stashed.
405
+
- Must be on a branch (not detached HEAD).
406
+
- No unassigned modified files (except untracked).
407
+
408
+
### Example
409
+
410
+
```
411
+
# Create a changelist for feature x
412
+
git cl add feature-x src/app.py src/utils.py
413
+
414
+
# Create changelist with other changes to stash away
415
+
git cl add docs docs/tutorial.md README
416
+
417
+
# Create a branch named after the changelist
418
+
git cl br feature-x
419
+
```
420
+
421
+
422
+
380
423
381
424
[↑ Back to top](#git-cl-a-git-subcommand-for-changelist-management)
382
425
383
-
## 3. Example Workflows
426
+
## 4. Example Workflows
384
427
385
-
### 3.1 Changelists as Named Staging Areas
428
+
### 4.1 Changelists as Named Staging Areas
386
429
387
430
`git-cl` changelists function as named pre-staging areas. Instead of staging files directly, you organise them into changelists — then selectively stage or commit based on those names.
The other changelists remain untouched, keeping your workspace organised and uncommitted changes visible.
411
454
412
455
413
-
### 3.2 Branching Mid-Feature with git cl stash
456
+
### 4.2 Branching Mid-Feature with git cl stash
414
457
415
458
Sometimes you're midway through a changelist but need to pause and start a new branch — without committing unfinished work. `git cl stash` makes that safe and simple.
416
459
@@ -432,7 +475,7 @@ This preserves your work-in-progress and the changelist grouping — so you can
432
475
433
476
[↑ Back to top](#git-cl-a-git-subcommand-for-changelist-management)
434
477
435
-
## 4. FAQ & Common Pitfalls
478
+
## 5. FAQ & Common Pitfalls
436
479
437
480
### How do I move a file from one changelist to another?
438
481
@@ -507,28 +550,28 @@ Yes. If the changelist was deleted after a stage or commit, you can create a new
507
550
508
551
[↑ Back to top](#git-cl-a-git-subcommand-for-changelist-management)
0 commit comments