How do I avoid typing “git” at the begining of every Git command?

后端 未结 15 758
醉酒成梦
醉酒成梦 2021-01-29 22:31

I\'m wondering if there\'s a way to avoid having to type the word git at the beginning of every Git command.

It would be nice if there was a way to use the

15条回答
  •  隐瞒了意图╮
    2021-01-29 22:50

    Here is another way. It's also not quite what was asked, but I've been using it for some time and it is pretty nice. Add the following line to your ~/.bashrc:

    complete -E -W git
    

    Now pressing Tab at an empty Bash prompt will type out "git ".

提交回复
热议问题