Hacker News new | ask | show | jobs
by garrettlarson 4496 days 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).
3 comments

You might want to check out the Bash completions for Git: https://github.com/git/git/blob/master/contrib/completion/gi.... They work with stash names so can take some of the pain away.
It'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).

Making an alias to use something like `stash apply #3` shouldn't be too complicated
That's a bad idea, it would need quoting as the `#3` would be considered to be a comment in most shells.