Answers for "git refname refs/heads/master not found"

2

error: refname refs/heads/master not found

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

$ git checkout -b main
Posted by: Guest on October-03-2020
3

error: refname refs/heads/master not found

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'
Posted by: Guest on April-10-2021
0

GIT Error refname refs/heads/master not found

git fetch
git reset --hard origin/master
Posted by: Guest on June-20-2021

Code answers related to "git refname refs/heads/master not found"

Browse Popular Code Answers by Language