6 ms·
Does anyone know why stash names are so ugly? I've always found typing "git stash apply stash@{3}" to be pretty painful (not to mention redundant).
by garrettlarson 13y ago
Does anyone know why stash names are so ugly? I've always found typing "git stash apply stash@{3}" to be pretty painful (not to mention redundant).
- ozh 13y agoMaking an alias to use something like `stash apply #3` shouldn't be too complicated
- heinrich5991 13y agoThat's a bad idea, it would need quoting as the `#3` would be considered to be a comment in most shells.
- _kfb 13y agoYou might want to check out the Bash completions for Git: https://github.com/git/git/blob/master/contrib/completion/git-completion.bash https://github.com/git/git/blob/master/contrib/completion/gi.... They work with stash names so can take some of the pain away.
- pornel 13y agoIt's a generic git syntax for "this reference 3 versions ago", see `man git-rev-parse` It works for other things too, e.g. you can undo rebase with `git reset master@{1}` (i.e. reset master to previous location of master).