Error Refname Refs Heads Master Not Found Fatal

[Solved] Error Refname Refs Heads Master Not Found Fatal | Shell - Code Explorer | yomemimo.com
Question : error: refname refs/heads/master not found

Answered by : alessandro-5wothm4yf17o

error: refname refs/heads/HEAD not found
fatal: Branch rename failed
$ git checkout -b main 

Source : https://stackoverflow.com/questions/18382986/git-rename-local-branch-failed | Last Update : Sat, 10 Oct 20

Question : error: refname refs/heads/master not found fatal: Branch rename failed

Answered by : yucky-yak-mcsz748n28b9

//make sure everything is commited before
git add .
git commit -m 'Init'

Source : https://stackoverflow.com/questions/18382986/git-rename-local-branch-failed | Last Update : Fri, 11 Mar 22

Question : error: refname refs/heads/master not found

Answered by : lokesh-ramchandani-in6l3jq294i2

I get into this issue too. The reason is that I didn't have any commit on this
git repository.
When I run the command git branch -M main. I get the following error message.	error: refname refs/heads/master not found	fatal: Branch rename failed
After I add my first commit by the following command, all things works.	git add .	git commit -m 'Init'

Source : | Last Update : Sat, 17 Apr 21

Question : error: refname refs/heads/master not found

Answered by : distinct-dog-hgtql1tb38ml

git add .
git commit -m 'Init'

Source : https://stackoverflow.com/questions/18382986/git-rename-local-branch-failed | Last Update : Sun, 18 Sep 22

Question : GIT Error refname refs/heads/master not found

Answered by : fine-fox-o33wao9r8b5f

git fetch
git reset --hard origin/master

Source : https://pt.stackoverflow.com/questions/388005/problema-na-hora-de-fazer-push-no-github | Last Update : Sun, 27 Jun 21

Answers related to error refname refs heads master not found fatal branch rename failed

Code Explorer Popular Question For Shell