Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

error: refname refs/heads/master not found

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

$ git checkout -b main 
Comment

GIT Error refname refs/heads/master not found

git fetch
git reset --hard origin/master
Comment

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'
Comment

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

//make sure everything is commited before 

git add .
git commit -m 'Init'
Comment

error: refname refs/heads/origin not found

try 
git push -u origin main

instead of
// git push -u origin master
Comment

error: refname refs/heads/master not found

git add .
git commit -m 'Init'
Comment

PREVIOUS NEXT
Code Example
Shell :: ubuntu desktop file folder 
Shell :: pull readme in local repository 
Shell :: shell shortcuts 
Shell :: unstage git add 
Shell :: npm install line awesome 
Shell :: check ram type 
Shell :: errno 2 no such file or directory less 
Shell :: ubuntu remove except file 
Shell :: improve ubuntu 16.04 performance 
Shell :: install brave fedora 
Shell :: cmd stop process on port 
Shell :: pacman 404 
Shell :: laravel generate random 6 digit number 
Shell :: grep in gz files 
Shell :: Yarn .gitignore for Zero Installs 
Shell :: npm steps 
Shell :: how to make ubuntu faster 
Shell :: bash print last n lines of file 
Shell :: git submodule update authentication 
Shell :: revert git pull 
Shell :: manjaro teamviewer 
Shell :: create sbt project 
Shell :: cdo mean of multiple files 
Shell :: artix linux 
Shell :: how to commit to github from terminal mac 
Shell :: command not found: strings 
Shell :: iisreset 
Shell :: vite starting code 
Shell :: error: insufficient permission for adding an object to repository database .git/objects 
Shell :: install crate 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =