Live data from Hacker News

Git git git git git

caiustheory.com

121–130 of 244 posts

Re: Git git git git git

#121
The danger of this is if you accidentally write 'git git something' into a shell script and it works on your machine, then you commit the script to a repo and it doesn't work for anyone else.

I suppose this is a problem with any alias.

Re: Git git git git git

#123

The danger of this is if you accidentally write 'git git something' into a shell script and it works on your machine, then you commit the script to a repo and it doesn't work for anyone else. I suppose this is a problem with any alias.

I find writing shell scripts is a different mental process than interacting with the commandline, so I think the problem of “starting a command then leaving the terminal” is non-existant in that context.

Re: Git git git git git

#124
post #35

Earlier quoted context omitted.

I often type "git clone ", then switch to a browser to copy/paste the URL, which is usually fine, but there are still many times where I've happened to include "git clone" in the copied string. (So I end up with "git clone git clone $URL").

iTerm gives you a warning if it thinks you just pasted in something malicious

Re: Git git git git git

#125

Earlier quoted context omitted.

I do. And I also write "vim vim thefile.txt" and stuff like that. Finally I've written a small shell function that corrects "gi tpull" to "git pull", because that happens at least once a day.

Try The Fuck: https://github.com/nvbn/thefuck/blob/master/README.md

I have The Fuck because I think the premise is hilarious, though I don't use it as much as I'd like since it's kind of slow for me...

Re: Git git git git git

#126
This reminds me of something I read long ago that was along the lines of "make the computer change for you, don't change for the computer". As such, I have a small list of common typo's that I make that alias themselves to their correct forms.

Since then, I've found that these aliases have been the best workflow improvement I've ever made.

Re: Git git git git git

#127
This is nice specifically because of the way the author uses `exec`. Without meaning to be patronizing, there must be lots of people reading the thread who don't know what `exec` does, and why it's a neat solution to this problem (or non-problem, whatever your view is); I'd say do look it up if you're interested in programming.

Re: Git git git git git

#128
post #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.

I often type "git clone ", then switch to a browser to copy/paste the URL, which is usually fine, but there are still many times where I've happened to include "git clone" in the copied string. (So I end up with "git clone git clone $URL").

Happens to me too!

Re: Git git git git git

#129
post #63

Earlier quoted context omitted.

Not this, but I do fairly often think assume I'm in vim when I'm not. `alias :q="echo NOT IN VIM!!!"`

My favorite one of these is typing ctrl-w (cut in emacs) in a browser tab as I am editing a bunch of text in a text box.

I use vimperator, so the only program I use a lot which still doesn't recognize ctrl+w is Hexchat.

My friends have gotten used to see me part the channel and rejoin shortly after, cursing my fingers.

Re: Git git git git git

#130

>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.

I do. And I also write "vim vim thefile.txt" and stuff like that. Finally I've written a small shell function that corrects "gi tpull" to "git pull", because that happens at least once a day.

For the latter, https://github.com/nvbn/thefuck is great and pretty satisfying to use.

(me earlier this month: https://twitter.com/sailoremo/status/908390247548911617)

Post reply on HN