4 ms·
Why type out `git status`? I use `gst`, and lots of other great aliases provided by the [oh-my-zsh git plugin](https://github.com/robbyrussell/oh-my-zsh/blob/ma
by bowmessage 9y ago
Why type out `git status`? I use `gst`, and lots of other great aliases provided by the [oh-my-zsh git plugin](https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/git/git.plugin.zsh https://github.com/robbyrussell/oh-my-zsh/blob/master/plugin...)
- Analemma_ 9y agoI used to do that, but I found it wasn’t actually saving me any cognitive load. My newer philosophy toward git aliases is the one described here: http://gggritso.com/human-git-aliases http://gggritso.com/human-git-aliases. After reading this I totally overhauled my .gitconfig and replaced it with the one described here and I’m a lot happier.
- pmoriarty 9y agoI don't use either one anymore. I've switched to magit, which is faster than both and can also give you interactive menus and reminders of commands if you want.
- chrissoundz 9y agoI realized this myself. And eventually ended up with a fuzzy search thing (using FZF): https://github.com/chrissound/LinuxVerboseCommandLib https://github.com/chrissound/LinuxVerboseCommandLib I can usually get away with typing the first letter of each word. So `gd` for git diff.
- oinksoft 9y agoSomewhat related, from my .bashrc for a in $(git var -l | sed -nE 's/^alias\.([^=]*)=.*/\1/p') ; do if ! command -v g$a >/dev/null 2>&1 ; then alias g$a="git $a" fi done Which creates a shell alias prefixed with `g` for each of my configured git aliases if there is no conflict. So I get not only the `gst` command you mentioned and ones like `gco` (because I have Subversion-equivalent aliases for common commands), but more complex ones like `gstpup` (stash, pull upstream, stash pop). Combined with `alias g=git`, I seldom type "git" and the setup is pretty convenient. I've thought of making the above alias unconditionally, or report conflicts, as it can be jarring when an alias is missing. I've also considered expanding it to all git commands because sometimes my custom ones live as `git-$command` scripts and not aliases.
- cbastuck 9y agogreat thx
- cryptonector 9y agoI've a variety of shell functions/aliases, like "gits" -> "git status -uno", gitd -> git diff, gitds -> git diff --staged, and so on. I also have a variety of git aliases like: ## git log aliases # # p -> --patch # o -> --oneline # r -> --reverse # s -> --stat # 1 -> -n1 # m -> master.. # om -> origin/master.. dom = diff origin/master.. doom = diff origin/master.. rbiom = rebase -i origin/master lp = log -p lo = log --oneline lo1 = log --oneline -n1 lr = log --reverse lm = log master.. lrm = log --reverse master.. lor = log --oneline --reverse lorm = log --oneline --reverse master.. lorom = log --oneline --reverse origin/master.. lom = log --oneline master.. loom = log --oneline origin/master.. l1 = log -n1 ...
- zeveb 9y agoWhy type 'gst'? I use C-x g, which is bound to magit-status:-) Somewhat more seriously, I haven't had to worry about typing 'git git' because I haven't typed 'git' on a daily basis in years. I think I've probably typed it once in the last month.
- mplewis 9y agoThe zsh git plugin, and scm_breeze (https://github.com/scmbreeze/scm_breeze https://github.com/scmbreeze/scm_breeze), are two of my favorite nice-to-haves for improving the Git experience.
- slavik81 9y agoFor me, it's because `gst` will only work on my machine. I like feeling at home on any system, so I'm loathe to depend heavily on aliases and configuration. One of the things I like about git git is that it appears to improve my experience without significantly affecting my habits.
- lilbobbytables 9y agoHow often are you running those commands elsewhere?
- thesmok 9y agoI have alias wow='git status' in my .profile because it's more fun (to me).