Re: Feature Request git snap, Lightweight Commit Workflow for Iterative Development

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Git contributors,

Thanks all for taking the time to review my proposal.You're all right,
Git already has tools to get a similar result.

Experienced Git users can set up shortcuts and alises and use tools
like fixup commits, rebase, and reflog,
but these can be hard to learn for beginners.A purpose to build snap
commands with simple syntax would make this workflow accessible to
more developers.

> fixup /squash  commits
> noisy logs branch fixup until final rebase.
> git snap keeps temporary commits in its own log (git snap log), so git log stays clean throughout.

>  commit --amend
>  only “undo” in a straight line.
> Reflog can recover old states, but isn't user-friendly or history maintained.
> git snap checkout <id> gives direct access to any checkpoint easy exploration,

>>> Workflow (Modified using your feedback)

# Branch
git checkout -b feature/batch-processor

# Begin snapshot session
$ git snap start
> Snapshot session started at 2025-dd-mm

# these files will be tracked, and any further changes will be
automatically included in future snap commits. ( removed flag
approach)
$ git snap add batch_processor.py job_config.yml

$ git snap commit
> snap: 1 @ 2025-dd-mm hh-mm-ss (2 files)

# Git snap will also track this
$  git snap add batch_processor.py

$ git snap commit -m "Parallel processing implementation"
> snap: 2 @ 2025-dd-mm hh-mm-ss (3 files) - Parallel processing implementation

$ git snap commit
> snap: 3 @ 2025-dd-mm hh-mm-ss (1 files)

$ git snap commit
> snap: 4 @ 2025-dd-mm hh-mm-ss (1 files)


$ git snap log
ID      Timestamp                   Files    Message(Optional)
--      ---------                   -----    -------
4       snap: 4 @ 18:25:18          1
3       snap: 3 @ 18:10:35          2
2       snap: 2 @ 17:45:22          3        Parallel processing implementation
1       snap: 1 @ 17:35:15          2

  $ git snap checkout 3
> Working directory set to snap: 3

$ git snap squash -m "feat: Implement efficient batch processor with
error handling"

# Result: Clean history with one meaningful commit
$ git log --oneline -n 1
8d72e56 (HEAD -> feature/batch-processor) feat: Implement efficient
batch processor with error handling

I appreciate the discussion and feedback.

Thanks,
Suraj Bhadrike





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux