News for hackers. Stuff that matters.
Re:Git git git git git by gulperxcx on Tuesday September 26, 2017 @03:38PM (#15341868)
>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 by perlgeek on Tuesday September 26, 2017 @03:52PM (#15341976)
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.

Re:Git git git git git by projektfu on Tuesday September 26, 2017 @04:43PM (#15342329)
I always typed rebnoot, so I patched Netbsd to allow rebnoot. Then I patched it still so it would say, "Rebnooting". Fun times.
Re:Git git git git git by dbcurtis on Wednesday September 27, 2017 @12:08AM (#15344848)
Relatable. For years, I aliased mroe to more. Now I alias mroe and more to less.

My wife drafts a lot of legal documents, and has a problem with "doe snot". Which unfortunately the spelling checker is perfectly happy with.

Re:Git git git git git by Singletoned on Wednesday September 27, 2017 @04:22AM (#15345819)
There's defintitely room for an advanced spell checker that can say "This is valid, but probably wrong".
Re:Git git git git git by MikeTV on Wednesday September 27, 2017 @12:17PM (#15349286)
I just ran across Language Tool[0] recently. Free, open-source proofreading lib, can be run totally locally. Uses Google Ngrams to check for often confused words. Didn't correct "doe snot" in my synthetic test just now, but that seems like a plausibly minor extension of existing functionality.

[0] https://www.languagetool.org/

Re:Git git git git git by goblin89 on Wednesday September 27, 2017 @09:39AM (#15347663)
There’s at least one product trying to address the issue with “valid, but probably wrong” typos. It’s called Grammarly and for some unfathomable reason it gets advertised to me a lot on YouTube whenever Google detects I’m in South Korea; I believe they are seriously mistargeting their marketing efforts.

(That said, if it were me, I’m not sure if I would give up typing doe snot every once in a while.)

Re:Git git git git git by salvar on Wednesday September 27, 2017 @04:56AM (#15345993)
Defiantly.
Re:Git git git git git by Ajedi32 on Wednesday September 27, 2017 @09:25AM (#15347543)
The spell checker in Chrome can already do that to some extent. For example, "The men walked over their to grab they're food." gets corrected: https://i.imgur.com/NR4zyVA.png
Re:Git git git git git by Fnoord on Wednesday September 27, 2017 @11:20AM (#15348650)
command-not-found [1] could implement that, if it isn't implemented already. I remember a Linux distribution with an application which would let a train pass in a few seconds after typing typical commands wrong. Trust me, you'll learn to type correct when that happens because it is very annoying.

EDIT: as mentioned below, it is called 'sl'

[1] https://wiki.ubuntu.com/CommandNotFoundMagic

Re:Git git git git git by jbergens on Thursday September 28, 2017 @02:31AM (#15355105)
The spelling checker in Word has some grammar rules, try to configure those if she uses Word.
Re:Git git git git git by polkijunk on Wednesday September 27, 2017 @04:29AM (#15345854)
defintitely
Re:Git git git git git by vollmond on Wednesday September 27, 2017 @11:01AM (#15348432)
My standard .bashrc aliases cd.. and cd- to the same thing with a space. Eliminating minor annoyances and focus-disruptors is great.
Re:Git git git git git by ytjohn on Tuesday September 26, 2017 @09:03PM (#15344068)
Our org has a bunch of related miscellaneous projects called "pantry". Basically, if it doesn't fit standalone, you put it in the pantry. It works out better than you think, except when someone is doing a webex and misses an r.
Re:Git git git git git by _pmf_ on Wednesday September 27, 2017 @02:22AM (#15345334)
"Rebnooting" sounds like it should be a real word; probably a military term.
Re:Git git git git git by mypalmike on Tuesday September 26, 2017 @05:45PM (#15342790)
Can't tell if serious...
Re:Git git git git git by popcorncolonel on Tuesday September 26, 2017 @06:05PM (#15342937)
Knowing software developers, probably entirely serious.
Re:Git git git git git by tosstossy on Tuesday September 26, 2017 @09:00PM (#15344056)
The seasoned sysadmins are a little more careful before smacking the enter key...
Re:Git git git git git by mcv on Wednesday September 27, 2017 @04:52AM (#15345978)
Depends on the importance of the system. If it's a fairly unimportant home system that's excessively backed up, it's fairly easy to live life on the edge.
Re:Git git git git git by Fnoord on Wednesday September 27, 2017 @11:25AM (#15348717)
rm -i and rm -f (as well as mv and cp) allow to specify certainty not merely for everyone above UID 0.

Keyword: Backups.

Re:Git git git git git by TheSoftwareGuy on Tuesday September 26, 2017 @07:32PM (#15343587)
It’s probably just a shell script or an alias
Re:Git git git git git by projektfu on Tuesday September 26, 2017 @09:27PM (#15344167)
An alias would work but it wouldn't say rebnooting. That was my initial fix. But I was learning things at the time and I learned how to recompile parts of the distribution. I also learned how programs in Unix could invoke different effects based on name. Coming from DOS, it was a real surprise that reboot was a link to shutdown.
Re:Git git git git git by therein on Wednesday September 27, 2017 @03:23AM (#15345587)
So I am assuming you ended up patching the `shutdown` binary to print `Rebnooting` if exec'd with the `rebnoot` name?

This is similar to how busybox binary implements a bunch of the tools from coreutils etc.

Re:Git git git git git by Aaargh20318 on Tuesday September 26, 2017 @06:30PM (#15343162)
Re:Git git git git git by _nothing on Tuesday September 26, 2017 @10:15PM (#15344367)
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 by masklinn on Wednesday September 27, 2017 @03:38AM (#15345633)
It's apparently grown an "instant mode" which goes much faster: https://github.com/nvbn/thefuck/blob/master/README.md#experi...
Re:Git git git git git by jmcgough on Tuesday September 26, 2017 @11:50PM (#15344784)
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)

Re:Git git git git git by gboudrias on Tuesday September 26, 2017 @04:13PM (#15342118)
If debian ever starts shipping with a util called "gi", I'm screwed!
Re:Git git git git git by sandov on Tuesday September 26, 2017 @04:18PM (#15342155)
Depending on how the scritp is written, you're screwed only if it comes with a tpull command.
Re:Git git git git git by jshap70 on Tuesday September 26, 2017 @04:17PM (#15342147)
`alias gi="rm -rf /"`
Re:Git git git git git by kzrdude on Tuesday September 26, 2017 @04:29PM (#15342236)
--no-preserve-root
Re:Git git git git git by stefco_ on Wednesday September 27, 2017 @09:52AM (#15347784)
sudo
Re:Git git git git git by gbrown on Tuesday September 26, 2017 @04:31PM (#15342251)
Suicide git
Re:Git git git git git by amag on Wednesday September 27, 2017 @06:38PM (#15352981)
sudocide
Re:Git git git git git by kelnos on Tuesday September 26, 2017 @05:29PM (#15342692)
Yes! I do all of those things too. git git, vim vim, and 'gi tpull' and 'gi tpush' and everything.

I think any command where you might start to type something out, but then need to refer to another window or session to figure out what else you want to type, is vulnerable to this kind of mistake.

Re:Git git git git git by aws_ls on Wednesday September 27, 2017 @10:29AM (#15348103)
Got a weird idea reading this. How about checking for all 127 error codes returned by $? (this is the return code that the shell gets, following a failed command, due to command not found).

This process should happen behind the scenes. And then train a RNN for translating it to the following command, which returns a success code. Perhaps, we need to add a few checks that successful command has the same intent as the one which returned 127 error code to the shell.

Re:Git git git git git by davedx on Wednesday September 27, 2017 @01:25AM (#15345118)
I just alias 'pull' to git pull, it's much nicer. Also 'push' and a few of the other most common ones.
Re:Git git git git git by crehn on Wednesday September 27, 2017 @01:41AM (#15345189)
Or alias to gp, gl, gd, ga, gmv, grm, gsh, glg, gcm, gcam, gpuo, gdwd, gpuom, ...
Re:Git git git git git by pluma on Wednesday September 27, 2017 @05:56AM (#15346245)
You're joking but...

    alias g='git status -sb'
    alias ga='git add'
    alias gac='git commit --amend'
    alias gb='git branch'
    alias gbb='git checkout -b'
    alias gbm='git branch --merged'
    alias gbn='git branch --no-merged'
    alias gc='git commit -m'
    alias gcp='git cherry-pick'
    alias gco='git checkout'
    alias gd='git diff'
    alias gdc='git diff --cached'
    alias gg='git status'
    alias gl='git log --graph --pretty=format:"%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset" --abbrev-commit'
    alias gla='git log --all --graph --pretty=format:"%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset" --abbrev-commit'
    alias ggpublish='git push && git push --tags && npm publish'
    alias gp='git pull --rebase && git push'
    alias gpp='git push && git push --tags'
    alias gpl='git pull --rebase --prune'
    alias gpt='git pull --rebase && git push --tags'
    alias grb='git rebase'
    alias grc='git rebase --continue'
    alias gsp='git stash ; gp ; git stash pop'
    alias unfuckgitremote='git branch --set-upstream-to=origin/`git rev-parse --abbrev-ref HEAD` `git rev-parse --abbrev-ref HEAD`'
I have to admit I use `unfuckgitremote` more often than you'd hope.
Re:Git git git git git by auscompgeek on Wednesday September 27, 2017 @08:35AM (#15347115)
Instead of `unfuckgitremote`, why not just use `git push -u`?
Re:Git git git git git by jasonm23 on Wednesday September 27, 2017 @10:06AM (#15347891)
origin head
Re:Git git git git git by _joel on Wednesday September 27, 2017 @09:01AM (#15347318)
Re:Git git git git git by labster on Wednesday September 27, 2017 @01:59AM (#15345244)
glwt
Re:Git git git git git by chris_wot on Wednesday September 27, 2017 @12:03AM (#15344834)
If only there was a git shell...
Re:Git git git git git by _joel on Wednesday September 27, 2017 @09:04AM (#15347346)
There is, but it's just a restricted login shell. I see what you mean though
Re:Git git git git git by sli on Wednesday September 27, 2017 @11:23AM (#15348698)
I put my most common git commands on keyboard macros mostly for this reason.
Re:Git git git git git by mrybczyn on Wednesday September 27, 2017 @09:45AM (#15347710)
alias p='git pull'

why type 8 characters 100 times a day, when you can type 1?

Re:Git git git git git by dogruck on Wednesday September 27, 2017 @01:27AM (#15345137)
Personally, I don't want my typos corrected when I enter commands. I prefer the negative reinforcement to encourage fewer errors. I also don't mind an occasional error.

Not hatin. Just wondering if I'm alone.

Re:Git git git git git by Wilya on Wednesday September 27, 2017 @01:58AM (#15345243)
You probably aren't alone, since commands that punish you when you mistype exist. Check out sl[0] or gti[1].

[0] https://github.com/mtoyoda/sl [1] http://r-wos.org/hacks/gti

Re:Git git git git git by dogruck on Wednesday September 27, 2017 @02:30AM (#15345366)
Ha -- both are amusing.
Re:Git git git git git by LeoPanthera on Wednesday September 27, 2017 @01:39AM (#15345185)
I'm the same, though I create tiny aliases for commonly typed commands. gp = "git pull", and so on.
Re:Git git git git git by toong on Wednesday September 27, 2017 @03:31AM (#15345611)
It's not only commands. My spelling skills took a dive, as google got better and better in guessing what I actually want to search for.

Can you disable that feature somewhere ? The suggestion is good, but automatically doing the corrected query is not!

Re:Git git git git git by warp on Tuesday September 26, 2017 @04:03PM (#15342052)
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").
Re:Git git git git git by bsimpson on Tuesday September 26, 2017 @08:50PM (#15344011)
<Insert obligatory "don't ever paste into a CLI because $SECURITY and then admit that I've done the same thing.>
Re:Git git git git git by xg15 on Wednesday September 27, 2017 @05:42AM (#15346195)
I think that advice got warped/lost in translation: Wasn't the original advice "dont't paste stuff copied from web pages into the CLI"? - Because a bad page could covertly change what is actually copied via JS.

That danger doesn't apply when things are copied from the browser chrome (address bar) or other locations. So why would pasting then still be dangerous?

I think blindly passing on advices "because $SECURITY" can actually detrimental to security because you may end up with half a dozen esoteric practices without actually knowing what they defend against. (I know the parent was half-joking, I think that's a more general problem)

Re:Git git git git git by jrimbault on Wednesday September 27, 2017 @09:13AM (#15347431)
You don't even need JS. In French and in style:

    <p>un paragraphe <span style="font-size: 0;">pas si </span>innocent</p>
So disabling JS won't protect you from those.
Re:Git git git git git by vbernat on Wednesday September 27, 2017 @02:14AM (#15345301)
Most shells now support a bracketed paste mode. zsh: https://github.com/zsh-users/zsh/commit/98687fa1dec803f041cb..., bash: https://www.gnu.org/software/bash/manual/html_node/Readline-... (enable-bracketed-paste)
Re:Git git git git git by itake on Tuesday September 26, 2017 @10:14PM (#15344364)
iTerm gives you a warning if it thinks you just pasted in something malicious
Re:Git git git git git by ospider on Wednesday September 27, 2017 @12:02AM (#15344822)
I think it gives warning when you paste something ends with a `\n`.
Re:Git git git git git by ReverseCold on Wednesday September 27, 2017 @01:03AM (#15345053)
I think my zsh does something to detect copy paste (and not execute the command till I press enter), or it could be iTerm, no idea.
Re:Git git git git git by isatty on Tuesday September 26, 2017 @11:43PM (#15344760)
Happens to me too!
Re:Git git git git git by martin-adams on Tuesday September 26, 2017 @04:52PM (#15342409)
The one I do is `git clone ` then paste in the repository URL from bitbucket, and end up with `git clone git clone https://....`

I don't think that can be solved here though.

Re:Git git git git git by Gaelan on Tuesday September 26, 2017 @05:06PM (#15342517)
I do that all the time, often with package managers (npm install npm install foo)
Re:Git git git git git by hinkley on Wednesday September 27, 2017 @01:21AM (#15345108)
CTRL-u CTRL-v
Re:Git git git git git by martin-adams on Wednesday September 27, 2017 @05:45AM (#15346203)
Nice! Never knew about CTRL+u. Thanks.
Re:Git git git git git by DiThi on Thursday September 28, 2017 @06:07AM (#15355968)
It's so far from my left hand I prefer to press ctrl+w twice. (yes, I use the mouse a bit too much)
Re:Git git git git git by rvanmil on Tuesday September 26, 2017 @04:55PM (#15342435)
Hah! Bitbucket drives me nuts in many ways but this one truly is the worst!
Re:Git git git git git by DiThi on Tuesday September 26, 2017 @06:31PM (#15343176)
Certainly. The user is either used to typing "git clone" or is using a GUI where you input the repo URL. How bitbucket does it would only be fine if you only use bitbucket or if everybody did it that way.
Re:Git git git git git by splaty on Tuesday September 26, 2017 @04:46PM (#15342356)
Not this, but I do fairly often think assume I'm in vim when I'm not.

`alias :q="echo NOT IN VIM!!!"`

Re:Git git git git git by emodendroket on Tuesday September 26, 2017 @08:07PM (#15343777)
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.
Re:Git git git git git by steinuil on Tuesday September 26, 2017 @11:47PM (#15344777)
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 by wlkr on Wednesday September 27, 2017 @03:51AM (#15345685)
Hexchat closing on C-w is such a pain! It can't be scripted away either because it's hardcoded in the source. I haven't looked into this for some time but there does seem to have been some updates.

https://github.com/hexchat/hexchat/issues/397

Re:Git git git git git by kqr on Sunday October 01, 2017 @04:02AM (#15376874)
That sounds like the kind of thing that would be really easy to maintain your own fork for...
Re:Git git git git git by auscompgeek on Wednesday September 27, 2017 @08:40AM (#15347150)
HexChat parting on Ctrl+w is probably one of the main reasons that drove me to use a TUI IRC client like weechat.
Re:Git git git git git by oAlbe on Wednesday September 27, 2017 @03:00AM (#15345477)
You can try Lazarus form recovery[1] to mitigate your pain. It locally saves the content of forms and allows you to pull it back.

[1] https://addons.mozilla.org/en-US/firefox/addon/lazarus-form-...

Re:Git git git git git by polymeris on Wednesday September 27, 2017 @01:26AM (#15345130)
Heh, for me ctrl-w means "extend selection to enclosing expression", which leads to the same issue in browsers.
Re:Git git git git git by andreareina on Wednesday September 27, 2017 @12:31AM (#15344944)
One of the things I appreciate about macOS is that it implements some of the emacs behavior (C-a, C-e, C-k). Unfortunately not C-y, and non of the M- ones work since that's for special characters. I understand they originally come from the readline library.
Re:Git git git git git by jasonm23 on Wednesday September 27, 2017 @10:09AM (#15347922)
Now try C-k and then C-y

Then regular old Cmd + v.

You're welcome.

Re:Git git git git git by kqr on Wednesday September 27, 2017 @12:58AM (#15345033)
Well, cutting is called killing in Emacs...
Re:Git git git git git by pvorb on Wednesday September 27, 2017 @02:26AM (#15345351)
So why is emodendroket referring to ctrl-w then?
Re:Git git git git git by emodendroket on Wednesday September 27, 2017 @09:54AM (#15347794)
In other words ctrl-w is "kill," which is what most people would think of as "cut," and ctrl-y is "yank," which is what most people would think of as "paste."
Re:Git git git git git by jasonm23 on Wednesday September 27, 2017 @10:10AM (#15347931)
And Vimmers would think of yank as copy or kill save
Re:Git git git git git by kqr on Sunday October 01, 2017 @04:05AM (#15376877)
That's funny. Never thought about that. I guess Emacs people think of it as yanking from the clipboard to the document, and Vim people think of it as yanking from the document into the clipboard.
Re:Git git git git git by z1mm32m4n on Wednesday September 27, 2017 @03:08AM (#15345517)
I actually aliased :q to clear:

https://github.com/jez/dotfiles/blob/master/util/aliases.sh#...

I also have clera, lcear, and lcera -> clear, and :tabe -> vim.

Re:Git git git git git by AdamGibbins on Wednesday September 27, 2017 @06:37AM (#15346422)
Are you aware Ctrl-l also clears? I can't recall the last time I typed clear.
Re:Git git git git git by jasonm23 on Wednesday September 27, 2017 @10:11AM (#15347938)
I have to admit, I wince when I see someone type clear.
Re:Git git git git git by Sir_Cmpwn on Tuesday September 26, 2017 @04:49PM (#15342381)
Not just `alias :q exit`?
Re:Git git git git git by heelhook on Tuesday September 26, 2017 @04:58PM (#15342457)
Not really, if they mean `:q` to exit vim and go back to the terminal `alias :q=exit` wouldn't produce the desired result.
Re:Git git git git git by maerF0x0 on Tuesday September 26, 2017 @06:23PM (#15343106)
could really mess with it:

> alias :q=vim -c ':q'

Re:Git git git git git by tomsthumb on Tuesday September 26, 2017 @06:59PM (#15343368)
best one
Re:Git git git git git by kronos29296 on Wednesday September 27, 2017 @01:17AM (#15345095)
I really do that a lot so I aliased 'q' to exit in shell.
Re:Git git git git git by masklinn on Tuesday September 26, 2017 @04:04PM (#15342065)
> Does anyone else actually do this besides OP.

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 <command>" in full.

Unsurprisingly…

    > rg 'git =' ~/.gitconfig 
    7:	git = ! git
Re:Git git git git git by mamcx on Tuesday September 26, 2017 @05:08PM (#15342531)
Something I have noted as part of my venturing into mechanical keyboards lead me to the revelation that many of my "mistakes" were really the keyboard failing me (ie, not properly register my keystrokes). All my life I assume was me the idiot that not know how use it. Only after I pay attention to how I use the keyboard (looking at my hands for a while) I start to see this.

So, I need to more firmly hit the keys in my actual driver (MS Ergo Keyboard) and now building my own mech...

P.D: ie: Maybe one of the different mech switches are more suited to the way YOU type:

http://www.wasdkeyboards.com/mechanical-keyboard-guide

---

P.D 2: This is a reply to all the ones that state that type wrong some commands.

Also, and maybe more common, is just bad typing. I was far worse before the use of the MS Ergo Keyboard (it DEMAND to use both hands.) So, if the performance change by keyboards (happend to me) maybe is a indication that are the tools at fault here..

Re:Git git git git git by Osiris on Tuesday September 26, 2017 @05:11PM (#15342561)
This happens to me all the time on the new Macbook keyboard, especially with the arrow keys. I can watch myself press the key and see nothing happen. I really need to switch to a good external Mac keyboard.
Re:Git git git git git by mwgalloway on Tuesday September 26, 2017 @04:48PM (#15342378)
I totally do this. I also occasionally will have something breaking and soon realize I typed 'git' randomly in the middle of a file instead of in my terminal...
Re:Git git git git git by temporallobe on Tuesday September 26, 2017 @11:56PM (#15344800)
I do stuff like because I alt-tab a lot and have so many similar-looking windows open. It's not just me either, I have seen stuff like "git pull" posted in chat rooms followed by "oops wrong window".
Re:Git git git git git by kellyjprice on Tuesday September 26, 2017 @03:42PM (#15341905)
All the time, at least twice already today. Another common command that I'll start typing only to switch context from is vim.
Re:Git git git git git by smellf on Tuesday September 26, 2017 @03:43PM (#15341914)
Think about all the keystrokes you'd save if you just typed "vi" instead.
Re:Git git git git git by kellyjprice on Tuesday September 26, 2017 @03:44PM (#15341918)
That's a habit I may never break. There's been enough times that vi was actually vi.
Re:Git git git git git by Gaelan on Tuesday September 26, 2017 @05:08PM (#15342533)
What kind of evil system ships with both vi and vim?
Re:Git git git git git by sverige on Tuesday September 26, 2017 @08:49PM (#15344007)
OpenBSD comes standard with vi. Vim is a package.
Re:Git git git git git by simias on Wednesday September 27, 2017 @02:42AM (#15345410)
It ships nvi, as do the other BSDs. I think it's reasonable, BSDs have a stronger divide between the base system and third party packages, I'm not sure it would make a lot of sense to maintain vim as part of the former.

Besides on my FreeBSD system /usr/bin/vi is around 400kB while on my Debian machine /usr/bin/vim.basic is 2.4MB. It's not much these days but on embedded platform it could still make a significant difference.

Re:Git git git git git by sverige on Wednesday September 27, 2017 @10:07AM (#15347898)
Yep, and "nex/nvi are intended as bug-for-bug compatible replacements for the original Fourth Berkeley Software Distribution (4BSD) ex and vi programs."
Re:Git git git git git by smellf on Thursday September 28, 2017 @01:46PM (#15359256)
Debian is the same way. But as soon as you open a file with vi on a fresh install, you know it isn't vim, so you close the editor, install vim, and then the vi command opens vim.
Re:Git git git git git by jjar on Tuesday September 26, 2017 @04:00PM (#15342042)
It's usually more "type git in a terminal then open a new tab to look something up and ALT-TAB back to the terminal" rather than a physical going away.
Re:Git git git git git by marcosdumay on Tuesday September 26, 2017 @03:54PM (#15341995)
I type `ls ls something` a lot because of this.

As a related issue, it bothers me a lot when I type some command that I want to read the output, and then I proceed to run `ls` right in the sequence and move the output out of the screen.

Re:Git git git git git by dom0 on Tuesday September 26, 2017 @04:10PM (#15342099)
... and then you clear the scrollback (Ctrl-L) but you can't just re-run the previous command because the system is now in a different state.
Re:Git git git git git by snowpalmer on Tuesday September 26, 2017 @04:34PM (#15342266)
FWIW, I'm also baffled that this is a problem to solve.
Re:Git git git git git by __s on Tuesday September 26, 2017 @08:50PM (#15344010)
Surprised how many are affirming this. Kind of a DAE moment. My fingers are a bit more tame from having spell check disabled & not falling back on these typo-aliases, as shown by the author's other aliases. Especially their t-prefix aliases which imply zsh aliasing gi to git
Re:Git git git git git by haylem on Wednesday September 27, 2017 @07:09AM (#15346595)
I sometimes do, though not specifically with git. Can be emacs, can be ls, can be anything where I interrupt my thought process.

So... I really fail to see why this article is of any relevance at all, really. Or at least a more global solution would have been better, but I think it's not really an annoyance. For me, it's the same as wanting to fix a UI so that I wouldn't re-double-click a software that I've already started (well, some prevent it, and generally when they do, it means there are sessions, and it annoys me).

Re:Git git git git git by CrystalGamma on Tuesday September 26, 2017 @04:35PM (#15342284)
I do the same with man instead (even though I only used that program like 50 times the last year) … it even happens in any other program where you can input text …
Re:Git git git git git by oneeyedpigeon on Tuesday September 26, 2017 @03:42PM (#15341903)
Yup. With lots of commands, not just git.
Re:Git git git git git by Bromskloss on Tuesday September 26, 2017 @08:28PM (#15343887)
Leave the computer? No, never.
Re:Git git git git git by INTPenis on Wednesday September 27, 2017 @08:13AM (#15346964)
The author seems to have a lot of issues with spelling.

Everyone is different. I know an electrical engineer who grew up with dyslexia. So everyone finds their own solutions.

Personally I very rarely spell things wrong in cli.

Re:Git git git git git by randiantech on Tuesday September 26, 2017 @05:10PM (#15342554)
It happens to me when cloning a repo. Sometimes I just write git clone ..., go to browser and the command already contains git clone, then i end up having sth like git clone git clone ...
Re:Git git git git git by michael_storm on Tuesday September 26, 2017 @03:40PM (#15341883)
I do. Everyone has their own tics; one of mine is that.
Re:Git git git git git by chasedehan on Tuesday September 26, 2017 @05:15PM (#15342587)
I do it all the time, but never thought it was the problem. Most often its to look up a reference number for a commit,

Then I get distracted on HN ...

Re:Git git git git git by jeffhuys on Wednesday September 27, 2017 @05:05AM (#15346038)
No. I have aliases for most things git:

gs = git status

ga = git add

gc = git commit

gp = git push

gl = git pull

gt = git tag

Re:Git git git git git by dbrgn on Wednesday September 27, 2017 @05:21AM (#15346101)
I never started with those two-letter aliases because they're bound to become problematic:

- gs is ghostscript

- gc is a component of graphviz

...and all of a sudden your text editor can't generate PDFs anymore when started from the shell.

Instead, I use four-letter aliases which work fine:

- gits = git status

- gitd = git diff

- gitc = git commit

..etc

Re:Git git git git git by hesselink on Wednesday September 27, 2017 @05:33AM (#15346155)
I aliased 'g' to 'git'. Combined with git aliases ('st' for 'status' etc) this is almost as short but doesn't steal all the short names from your shell. So instead of 'gs' you have 'g st'. Upside is you save two letters even on uncommon git commands :)
Re:Git git git git git by noobermin on Tuesday September 26, 2017 @03:55PM (#15342007)
I do not. I thought the only reason that this was on the front page was because it was funny.
Re:Git git git git git by LiamPa on Tuesday September 26, 2017 @03:54PM (#15341998)
+1, what are you all looking at when typing git over and over again?
Re:Git git git git git by Avshalom on Tuesday September 26, 2017 @04:38PM (#15342297)
I just type git (or more commonly ls/cd) once on auto pilot because I'm at a terminal then without thinking about it hard I'll type it in consciously because that's why I'm at a terminal. It doesn't even involve looking away
Re:Git git git git git by stormbrew on Tuesday September 26, 2017 @03:53PM (#15341988)
Yep. And I did the exact same thing the OP did about it.
Re:Git git git git git by tejasmanohar on Tuesday September 26, 2017 @04:40PM (#15342317)
Yes, I do this all the time with all sorts of commands.
Re:Git git git git git by manojlds on Wednesday September 27, 2017 @03:35AM (#15345622)
Sometimes, while copy pasting.
Re:Git git git git git by randallsquared on Tuesday September 26, 2017 @05:12PM (#15342564)
Often, yes.
Re:Git git git git git by joekrill on Wednesday September 27, 2017 @08:38AM (#15347140)
I do it fairly often.
Re:Git git git git git by dorian-graph on Tuesday September 26, 2017 @04:16PM (#15342139)
Yup, I do.