Re: Better usability of stash refs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 19, 2017 at 03:32:54PM -0500, Robert Dailey wrote:

> To drop a stash, I have to do this (example):
> 
> $ git stash drop stash@{3}
> 
> Using the full "stash@{N}" seems superfluous since the documentation
> states it must be a stash in the first place. It would make more sense
> (and be quicker to type) to do:
> 
> $ git stash drop 3
> 
> Is there a trick I can use to make this shorthand possible? I thought
> about creating a "s" script for "stash" that intercepted the
> parameters for only a couple of stash sub-commands and created the
> ref, but that seems a lot of work.
> 
> Any productivity tips here? Thanks in advance.

Junio mentioned that this is already possible. I suspect the problem may
be that your Git is not recent enough. It was added in a56c8f5aa (stash:
allow stashes to be referenced by index only, 2016-10-24), which is in
v2.11.0.

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux