Re:The Fuck – An app which corrects your previous console co...
by savanaly on Monday April 17, 2017 @04:07PM
(#14133972)
For those who don't know, you can make git pish have the same effect as git push by creating an alias between pish and push. Useful to do for any misspellings you make more than once.
$ git config --global alias.pish push
Re:The Fuck – An app which corrects your previous console co...
by headmelted on Monday April 17, 2017 @04:14PM
(#14134018)
Cannot for the life of me tell if this is a serious suggestion.
Re:The Fuck – An app which corrects your previous console co...
by oxguy3 on Monday April 17, 2017 @05:06PM
(#14134428)
I've actually done this for a couple commands I screw up often enough -- I have this in my bashrc:
alias dumbtypo="echo 'LEARN TO TYPE, MORON'"
alias sl="dumbtypo; ls"
alias rbuy="dumbtypo; ruby"
alias pytohn="dumbtypo; python"
alias brwe="dumbtypo; brew"
alias arhcey="dumbtypo; archey"
Re:The Fuck – An app which corrects your previous console co...
by mod on Monday April 17, 2017 @05:47PM
(#14134707)
I'm incredulous that 'pythong' is not in there.
I can't not-type it.
Re:The Fuck – An app which corrects your previous console co...
by Sunset on Tuesday April 18, 2017 @04:07AM
(#14137165)
You ... type "python"? Not pyt[tab]?
Re:The Fuck – An app which corrects your previous console co...
by taude on Monday April 17, 2017 @09:58PM
(#14135956)
I type pythong all the time, too.
Re:The Fuck – An app which corrects your previous console co...
by calibration263 on Monday April 17, 2017 @07:42PM
(#14135409)
I was worried I was the only one!
Re:The Fuck – An app which corrects your previous console co...
by giancarlostoro on Monday April 17, 2017 @05:28PM
(#14134569)
if you sudo apt install sl you will have more fun making that typo ;)
Re:The Fuck – An app which corrects your previous console co...
by jdc0589 on Monday April 17, 2017 @04:17PM
(#14134045)
there are a couple things I typo frequently enough I've seriously considered it...
Re:The Fuck – An app which corrects your previous console co...
by savanaly on Monday April 17, 2017 @04:36PM
(#14134193)
It is-- what is the perceived downside?
Re:The Fuck – An app which corrects your previous console co...
by brianwawok on Monday April 17, 2017 @04:54PM
(#14134334)
You have a giant list of common typos, making you a worse and worse typer as years go on, until you are mashing your head on the keyboard to type anything.
Re:The Fuck – An app which corrects your previous console co...
by savanaly on Monday April 17, 2017 @05:24PM
(#14134541)
I dunno, I don't think that would really happen. I'm always trying to type the same word (I don't say "pish" in my head, after all, I think "push"), so it doesn't seem to be a random walk away from correctness, just some wavering around it. And it's not like I have that many commands I need to type commonly enough to make an alias for-- maybe a couple dozen? And for most of them, I don't make typos so I don't feel the need to make an alias.
Re:The Fuck – An app which corrects your previous console co...
by artursapek on Monday April 17, 2017 @04:15PM
(#14134027)
alias gp="git push" has probably saved me hours of my life
Re:The Fuck – An app which corrects your previous console co...
by madmax108 on Monday April 17, 2017 @05:07PM
(#14134435)
Amen.
My bashrc has so many of these, and they're probably among the most common commands I use daily!:
alias gs="git status"
alias gb="git branch"
alias grh="git reset --hard"
alias gcdf="git clean -df"
alias gf="git fetch"
alias gp="git pull"
alias gdom="git diff origin/master"
alias gdomn="git diff --name-status origin/master"
alias gd="git diff"
alias gl="git log"
alias glm="git log --author <my_name>"
alias gc="git checkout"
alias gcm="git checkout master"
Re:The Fuck – An app which corrects your previous console co...
by gsmethells on Monday April 17, 2017 @08:10PM
(#14135526)
I agree, but I am just too lazy for that. Mine are all one char:
alias b='/usr/local/bin/git checkout -b'
alias a='/usr/local/bin/git add
alias d='/usr/local/bin/git diff HEAD'
alias c='git commit -m'
alias i='/usr/local/bin/git pull origin'
alias o='/usr/local/bin/git branch -avv | grep "\*" | cut -d\ -f 2 | xargs -n 1 /usr/local/bin/git push -u origin'
plus: alias g='/usr/local/bin/git log --graph --oneline --decorate
alias v='/usr/local/bin/git branch -avv'--all'
alias h='/usr/local/bin/git log -p'
can be useful.
Re:The Fuck – An app which corrects your previous console co...
by amyjess on Monday April 17, 2017 @06:00PM
(#14134801)
Am I a bad person for creating SVN-style aliases for git?
From my .gitconfig:
[alias]
st = status
ci = "!git add -u && git commit"
di = diff
I come from an SVN background, I've since switched to Mercurial for my personal projects, and intensely dislike git, but have to use git at work, so I finally said "enough is enough" and made aliases so I can use git like svn/hg.
Re:The Fuck – An app which corrects your previous console co...
by mod on Monday April 17, 2017 @05:49PM
(#14134729)
I use gcm for `git commit -m `, interestingly.
I only use a few git aliases, most things I'd rather type out.
Re:The Fuck – An app which corrects your previous console co...
by Cub3 on Monday April 17, 2017 @06:48PM
(#14135091)
I use Git Goodies, great list of aliases - https://github.com/qw3rtman/gg
Re:The Fuck – An app which corrects your previous console co...
by progval on Monday April 17, 2017 @05:55PM
(#14134774)
Aliasing gs may be a bad idea, there is actually a command named like that (it's part of GhostScript)
Re:The Fuck – An app which corrects your previous console co...
by madmax108 on Monday April 17, 2017 @06:50PM
(#14135103)
Of course to each his own, but honestly, nothing I work on involves Ghostscript (or Postscript tbh) so not too much of a concern to me.
It's just so much quicker to recall stuff: [g]it [s]tatus :)
Re:The Fuck – An app which corrects your previous console co...
by jakub_g on Monday April 17, 2017 @06:57PM
(#14135141)
I have a similar set, plus
alias goto='git checkout'
Re:The Fuck – An app which corrects your previous console co...
by amelius on Monday April 17, 2017 @05:08PM
(#14134442)
Or how about git commit with a dummy message? :)
Re:The Fuck – An app which corrects your previous console co...
by eric_h on Monday April 17, 2017 @06:48PM
(#14135088)
Oh dear. That reminds me of a story I saw here on HN at some point (might have been in the comments) about a dev team that didn't insist on any commit messages in their VCS, so everyone just put in a '.' to meet the requirement that a commit had to have a message for whatever source control system they were using.
My team doesn't have a strict commit message style guide, but good god it better be at least mildly descriptive of what's in the commit.
(I know you're joking, the thought of a 3 character alias to commit with a dummy message just sent shivers down my spine :)
Re:The Fuck – An app which corrects your previous console co...
by jurie on Monday April 17, 2017 @10:08PM
(#14135993)
Like this?
$ cat << EOF > ~/.commit_reasons; strfile ~/.commit_reasons
Testing...
%
Testify...
%
Testarossa...
%
Does it work yet?
%
How bout now?
%
Oops.
%
Fixed a thing.
%
EOF
$ fortune ~/.commit_reasons | cowsay | git -F -
Re:The Fuck – An app which corrects your previous console co...
by tfn on Tuesday April 18, 2017 @10:31AM
(#14139088)
Even better: https://news.ycombinator.com/item?id=5666160
Re:The Fuck – An app which corrects your previous console co...
by jdc0589 on Monday April 17, 2017 @04:20PM
(#14134064)
looks like oh-my-zsh ships with this... couldn't figure out why I had it already.
Re:The Fuck – An app which corrects your previous console co...
by Lukas_Skywalker on Monday April 17, 2017 @05:04PM
(#14134415)
Git even has a wonderful autocorrect feature that you can enable with
"git config --global help.autocorrect 1"
This fixes commands like git pish or git ermote
Re:The Fuck – An app which corrects your previous console co...
by bcherny on Monday April 17, 2017 @03:53PM
(#14133880)
For me it tends to be
$ git poop
Re:The Fuck – An app which corrects your previous console co...
by zacharyvoase on Monday April 17, 2017 @04:09PM
(#14133979)
as opposed to `git log`?
Re:The Fuck – An app which corrects your previous console co...
by bcherny on Monday April 17, 2017 @07:10PM
(#14135221)
In case that wasn't a joke - no, `git pop`.
$ git pish
$ fuck