My shell prompt looks like this: ➜ ~ git:(master) ✗. How can I get my normal prompt back?

前端 未结 10 1883
别跟我提以往
别跟我提以往 2021-01-03 07:56

My normal terminal command line has suddenly disappeared and has been replaced by this git command line ➜ ~ git:(master) ✗.

How do I get rid of this an

10条回答
  •  天涯浪人
    2021-01-03 08:37

    Just ran into this problem. Sharing how I resolved for my future self.

    When switching to zsh in home/username, the shell shows git:(master). This is due to 2 things: 1. You have installed a Git package for ZSH 2. You have likely created a .git repo under home/username so zsh is picking it up from your current location.

    Steps to resolve: 1. Type ls -a into terminal and you will be able to see .git and .gitconfig files 2. Move .git and .gitconfig files to your specified git repository folder with mv .git ./git_repositories/ and mv .gitconfig ./git_repositories/ 3. type bash into terminal then type zsh into terminal and it should resolve the issue.

提交回复
热议问题