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
I'm assuming you entered "git init" like I did. It took me a while to figure this out, but when you entered "git init" you created a hidden git folder named ".git".
You can see the folder by going to your home directory and typing "ls -a".
Simply remove the file (rm -rf .git), and the prompt will magically disappear.
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.
There seems to be a few command line tools that work together with Git that add those customizations.
In my case after installing Drush I got my ~/.bashrc
file updated with Drush-specific customizations, which in this case affffded a green (master *) $
to the prompt, no matter where I was (very annoying).
Fixed it by commenting out the block after # Include Drush prompt customizations.
in my ~/.bashrc
and then source ~/.bashrc
This happened to me when getting my head around zsh and git. I created a git repo in the wrong folder and started seeing this zsh context. Because I didn't want a repo in this directory I removed the git information with:
rm -R .git
Note you will only want to do this if you have an invalid git repository.