I'm new to git, and first I cloned a remote repository doing like this:
git clone https://git_romote_url/repository_name.git
and then I created a branch locally by:
git checkout -b branch_name
then I wanted to delete the branch branch_name, so I tried the following command:
git branch –delete branch_name
git branch –d branch_name
git branch –-delete branch_name
I knew the first command is wrong (missing a horizontal line), so I tried the following two.
But after this, when I shown branches by:
git branch
The branches list showed:
* master
–-delete
–d
–delete
And when I want to delete either one of "--delete", "-d" or "-delete" by:
git branch --delete --delete
git branch --delete -d
git branch --delete -delete
I got:
fatal: branch name required
I have searched the internet, but found nothing like my problems.
So, could someone please help explain why this happens and how should I handle this problem (I want to delete the three branches except master if it is ok and necessory to do this) .
Any help or hint is very appricated, and thanks in advance.