3 ms·
I use the colon as EDITOR with Git when I want to do an interactive rebase combined with auto squash without having to edit the todo list. I have an alias[1] f
by fphilipe 2mo ago
I use the colon as EDITOR with Git when I want to do an interactive rebase combined with auto squash without having to edit the todo list.
I have an alias[1] for that which I call a quick interactive rebase:
riq = -c sequence.editor=: rebase --interactive
[1]: https://github.com/fphilipe/dotfiles/blob/94f2ff70bade070694f5dc1317aa8f702cfdedcd/gitconfig#L45 https://github.com/fphilipe/dotfiles/blob/94f2ff70bade070694...
- refp 2mo agodamn, nice one — definitely gonna use this myself (or variations thereof)!
- __del__ 2mo agonice dotfile
- teddyh 2mo agoThat seems unsafe. It assumes that the editor is started via a shell command, and not executed directly. But there is no actual binary /usr/bin/: but there is a /usr/bin/true; I would use that instead.
- jeremyjh 2mo agoIt assumes git works the way that git works, and that git will not break backwards compatibility in the future. I think the same can be said of any alias in git.
- teddyh 2mo agoThe question is, is this behavior documented to run the command in a subshell? If it’s only documented to split on spaces and expand environment variables, the git command could change the implementation at any time.