Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jwiegley/git-undo-el
A command for Emacs to regress or "undo" a region back through its Git history
https://github.com/jwiegley/git-undo-el
Last synced: 24 days ago
JSON representation
A command for Emacs to regress or "undo" a region back through its Git history
- Host: GitHub
- URL: https://github.com/jwiegley/git-undo-el
- Owner: jwiegley
- Created: 2017-11-20T20:36:44.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-08-07T15:51:23.000Z (about 2 years ago)
- Last Synced: 2024-08-02T01:26:04.251Z (3 months ago)
- Language: Emacs Lisp
- Size: 12.7 KB
- Stars: 91
- Watchers: 3
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# git-undo
When `M-x git-undo` is called on a region, it will first:
1. Replace the region, if it has been modified but not saved, with the
current working tree version.2. Replace the region, if it has been modified and saved, with the current
HEAD version.
3. Successively walk back through all the versions of that region found in
the Git history.
Note that if this command is run twice, it begins the walkthrough over again,
since there's no easy way of knowing at which point in history you were before
you repeated the command. Perhaps this could be added by searching through the
Git history for matching contents.## Example use
Mark a region in a Git-controlled buffer and execute `M-x git-undo`. Then use
`C-x z` to step through changes to that region in Git's history.