Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git Error "fatal: invalid branch name: init.defaultBranch ="

Tags:

git

github

I getting this error when ever I do git clone

Error :- fatal: invalid branch name: init.defaultBranch =

Tried to reinstall git (latest)

Still same error

OS :- Windows

Git CMD Log

like image 747
Bravo 68 Web Avatar asked Oct 14 '20 09:10

Bravo 68 Web


2 Answers

It would appear that you have experimented with the new (2.28) init.defaultBranch configuration value.

Assign it a proper value:

git config --global init.defaultBranch main 
like image 54
CodeCaster Avatar answered Oct 08 '22 13:10

CodeCaster


Got it

Enter this in terminal

git config --global init.defaultBranch master

like image 39
Bravo 68 Web Avatar answered Oct 08 '22 15:10

Bravo 68 Web