Alright, so @philnash roped me into this one.
This post’s birth comes from a gist which is essentially a copy paste of my git aliases.
I’m going ...
For further actions, you may consider blocking this person and/or reporting abuse
Nice list you have.
This is mine:
I don't use bisect or rebase that much so I don't have shortcuts. I use
git out
a lot to see what's going up to the origin. I've aliasedmerge
tomerge --no-ff
because that's what you want 99% of the time. I probably have too many aliases oflog
:DThanks for sharing @rhymes !
I'm a little disappointed
git out
isn't something likesudo reboot
AHAHHAAHAH thanks for the laughter.
I should probably start aliasing it on colleagues's computers :D
I usually make aliases only for those that have specific parameters or are compound of more than one command.
In the other cases, I use the shell auto-completion with the TAB key.
Also, for those like this:
If you do that very frequent i think it's better a shell alias (
gs
) than a git alias (git s
)I do have shell aliases for some things, like grabbing a PR locally (fish shell alias)
At the end of the day, everyone has their own setups, which is normal. All that matters is that you set things up the way you like that makes you more productive.
I also don't mention it in the post but I have a shell alias for
git
which is justg
, so I'd dog s
gs
has an unpleasant collision withGhostScript
.Thanks for the post Nick! There's such a lot in here and I learned about a couple of commands too. The lost and found search is interesting, not a very common use as you said, but something worth remembering just in case.
I just checked my aliases and I was almost disappointed with how few I have!
I do have this function in my
.bash_profile
though. It allows you to useg
in place ofgit
and if you pass no other arguments runsgit status
. I find it pretty useful.Glad you like it. Thanks for suggesting I write it up. I alias git to
g
as well, but I like how you default to showing status of no git command is passed in. 🔥This is my list:
Very simple
You copied mine XD
I did copy from somewhere in StackOver flow many many years ago. I am not sure if was from you or not :P.
I removed my own aliases and went to a more popular list, namely I adopted bash-it framework.
If it makes you more productive going with existing ones, then 💯.
Out of curiosity, what was the motivation to give up your own aliases in favor of an alias framework?
Reducing the cognitive load mainly (on me, staying up to date, thinking of new aliases, and so on),
the fact that more devs are usually better than 1 (bashit being open source),
easier to install and
increasing the chance that my aliases are on other PCs.
And I didn't saw any disadvantage.
Thanks for answering! I really appreciated the insight, since it's different from how I work, and I like trying to reevaluate my own usage habits from time to time.
Change is always hard, I used those aliases for many years, but it was time to move on once I started to work from multiple workstations and environments (including Cloud9) I had to simplify all my "custom won bubble".
Adding a late one to the list
git config --global alias.mend "commit --amend"
. Calling it mend seems more natural to me and since I aliasgit
tog
in my shell, I'm gonna be all about theg mend
.One thing I don't like about Git aliases is that when you are on a new environment (coworker laptop, remote server, etc.) they won't work. So it's better to remember original commands.
My personal take on this is that for many people, you're on a small set of machines 95% of the time, so it's worth it to optimize your setup on that set of machines.
However, I know that my experience isn't universal - if most of the time you're logging into a large number of machines or machines that are ephemeral in nature, my take doesn't really apply!
For my day to day this is generally not an issue, but if I were on a co-worker's machine or a remote server and for some reason I couldn't remember a git command, I'd use the Google 😉
I love those two to three letter aliases. Life's to short for typing ;)
But I use aliases in my
.zshrc
where all my aliases live :]I loved all your aliases, except those that commit a generic commit message. Thanks for share.
Yeah, I don't use those ones too often. I'm considering removing them.
Very timely! I've got to learn git in the near future this year, and the one thing I'm sure I'll be using right away is aliases. Muchos gracias! Спасибо!
I'm confortable with git alias plugin in oh-my-zsh
To see all commands, can use:
alias | grep git