Sat 18 Jun 2022


git snap creates a commit that includes most local changes on a user- and machine-specific snapshots branch. It doesn't ask for a commit message. It also doesn't touch the working tree, saves and restores the index, and switches back to the branch that was checked out before running git snap. In other words, everything looks the same as before after running git snap, but your changes are safely stored by Git and can be pushed to a remote for redundancy or sharing. This is in contrast to stashes.

Source: git-snap: Create snapshot commits on a not checked-out branch without touching the working tree or losing staged changes, an article by Lukas Waymann.