Live data from Hacker News

Git git git git git

caiustheory.com

41–50 of 244 posts

Re: Git git git git git

#41

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

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

#42

`!exec git` caused my shell to exit. I have a lot of stuff wrapping git in my shell though (including a bash function wrapping git itself!). The author himself only pushed up the change to his own gitconfig a few hours ago. It was previously `!$SHELL -c \"git $*\"`. My 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 ab…

Add double quotes around $@.

Re: Git git git git git

#43

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

If debian ever starts shipping with a util called "gi", I'm screwed!

Re: Git git git git git

#44

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

I've a variety of shell functions/aliases, like "gits" -> "git status -uno", gitd -> git diff, gitds -> git diff --staged, and so on.

I also have a variety of git aliases like:

        ## git log aliases
        #
        # p  -> --patch
        # o  -> --oneline
        # r  -> --reverse
        # s  -> --stat
        # 1  -> -n1
        # m  -> master..
        # om -> origin/master..
        dom     = diff origin/master..
        doom    = diff origin/master..
        rbiom   = rebase -i origin/master
        lp      = log -p
        lo      = log --oneline
        lo1     = log --oneline -n1
        lr      = log --reverse
        lm      = log master..
        lrm     = log --reverse master..
        lor     = log --oneline --reverse
        lorm    = log --oneline --reverse master..
        lorom   = log --oneline --reverse origin/master..
        lom     = log --oneline master..
        loom    = log --oneline origin/master..
        l1      = log -n1
        ...

Re: Git git git git git

#48

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.

If debian ever starts shipping with a util called "gi", I'm screwed!

`alias gi="rm -rf /"`

Re: Git git git git git

#49

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.

If debian ever starts shipping with a util called "gi", I'm screwed!

Depending on how the scritp is written, you're screwed only if it comes with a tpull command.
Post reply on HN