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

后端 未结 15 993
醉酒成梦
醉酒成梦 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:55

    A friend of mine made a small bash script that accomplishes this. It's called Replify.

    $ replify git
    Initialized REPL for [git]
    git> init
    Initialized empty Git repository in /your/directory/here/.git/
    
    git> remote add origin https://your-url/repo.git
    
    git> checkout -b new-branch
    Switched to a new branch 'new-branch'
    
    git> push
    

提交回复
热议问题