>I quite often type git then go away and come back, then type a full git status after it. Does anyone else actually do this besides OP. I've never heard of this problem until now.
Git git git git git
31–40 of 244 posts
Re: Git git git git git
#32Re: Git git git git git
#33Why 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/plugin... )
Somewhat 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…
Re: Git git git git git
#34>I quite often type git then go away and come back, then type a full git status after it. Does anyone else actually do this besides OP. I've never heard of this problem until now.
Re: Git git git git git
#35>I quite often type git then go away and come back, then type a full git status after it. Does anyone else actually do this besides OP. I've never heard of this problem until now.
Re: Git git git git git
#36My version that works for my setup is `"!f() { git \"$@\"; }; f"`.
Hope this helps anyone who ran into the same issue, although I'm not 100% confident about the quoting.
EDIT: fixed the quoting, as per cryptonector's suggestion
EDIT2: need to quote the quotes for gitconfig to use it correctly
Re: Git git git git git
#37>I quite often type git then go away and come back, then type a full git status after it. Does anyone else actually do this besides OP. I've never heard of this problem until now.
Guilty as charged. I'll commonly start typing git, think about something else, switch to my editor, browser or an other terminal tab, then come back and type "git " in full.
Unsurprisingly…
> rg 'git =' ~/.gitconfig
7: git = ! gitRe: Git git git git git
#38You can also just use 'fuck' for this: > git git pull git: 'git' is not a git command. See 'git --help'. The most similar command is init > fuck git pull [enter/↑/↓/ctrl+c]
Re: Git git git git git
#39The mathematical term for a function that is the same when applied multiple times giving you the same results is called "idempotent" which translates to "same power". f^n(x)=f(x) for some positive natural number n and any x. https://en.wikipedia.org/wiki/Idempotence
I had a senior dev interview with a major company in SV last year where the lead and hiring manager claimed that the description for this behavior was "side-effect free". I didn't want to ruin my chances by correcting him that side-effects and idempotence refer to different qualities. I passed the interview, but I've never forgotten that. The guy also seemed to have washed into the interview off his surf board. Oh we…
One notable example: Stripe's "idempotency keys": https://stripe.com/blog/idempotency