kahole / edamagit

Magit for VSCode
https://marketplace.visualstudio.com/items?itemName=kahole.magit
MIT License
1.12k stars 63 forks source link

magit wip mode #107

Open jtrakk opened 3 years ago

jtrakk commented 3 years ago

magit-wip-mode keeps track of uncommitted work in progress automatically in the background. This is like a persistent undo. It's very nice for when I haven't committed yet but I want to review an earlier version. The Emacs Magit implementation uses non-branch refs.

kahole commented 3 years ago

Nice. TIL How often does it trigger its saves/wip-commits?

jtrakk commented 3 years ago

There are user settings for hooks for committing after save, before git change, after git change.

For example, magit-wip-before-change-mode says

Before invoking a revert command or an "apply variant" command (apply, stage, unstage, discard, and reverse) commit the affected tracked files to the current wip refs. For each branch there may be two wip refs; one contains snapshots of the files as found in the worktree and the other contains snapshots of the entries in the index.