Hacker News new | ask | show | jobs
by Already__Taken 4654 days ago
Even just simple commands kind of bother me for poor consistency.

  git remote -v
  git branch -a
  git tag -l
  git stash list
1 concept, 4 commands. I don't even use git much but this stuff makes it really slow to pick up.
2 comments

If you're curious, "git remote", "git branch", and "git tag" all present a list without supplying those options. You only need "git branch -a" if you want to see remote branches.

"git stash" is certainly the outlier; the reason is that when "git stash" was first added it was meant to be a short-and-sweet command. Otherwise, you'd be forced to type "git stash save <name>", which is not so short and sweet. "git stash list" was added later.

remote branches can also be achieved with one flag by using `-r` ( git branch -r ). Neat note about the reasoning behind stash.
I assume you're referring to the use of the different flags?

For the latter two, no disagreement there. For the former two, there is a difference between returning a verbose response within the context queried and expanding the inclusive parameters of the query. 'git remote -a' makes no sense as all remotes are equivalent (there is no such thing as a local remote).