her.esy.fun/src/Scratch/en/blog/2009-12-14-Git-vs--Bzr/code/gitconfig

3 lines
204 B
Plaintext
Raw Normal View History

2021-04-18 10:23:24 +00:00
[alias]
uncommit = !zsh -c '"if (($0)); then nb=$(( $0 - 1 )); else nb=0; fi; i=0; while ((i<=nb)); do git revert -n --no-edit HEAD~$i; ((i++)); done; git commit -m \"revert to $0 version(s) back\""'