4 ms·
> You will need to keep the name of previous branch in your head Not even that - "git checkout -" is like "cd -", but for branches. I have it on a short alias
by sudahtigabulan 2y ago
> You will need to keep the name of previous branch in your head
Not even that - "git checkout -" is like "cd -", but for branches.
I have it on a short alias - cor. I do "cob asdf", do some work, then "cor". (I have 28 aliases for git alone, 2 or 3 letters each. And I still get to autocomplete any options when necessary, thanks to https://github.com/cykerway/complete-alias https://github.com/cykerway/complete-alias).
- incognito124 2y agoDon't you think having 28 aliases for the git incantations in your worflow is a clear signal something is wrong with git?
- fragmede 2y agoDon't you think having 300+ commands in /bin is a clear signal something is wrong with Unix? No?
- 000ooo000 2y agoThis argument makes sense only if you think Git has, like, 2 uses.
- sudahtigabulan 2y agoIt's mostly because of my attempts to minimize keypresses due to RSI. I would end up with similar, albeit lower, number of aliases if I were to use jj.
- yxhuvud 2y agoThere are certain cases that - isn't allowed in though, like git branch -d.
- sudahtigabulan 2y agoI've only ever needed it for checkout, but in other commands I believe the full syntax @{-1} should work.