Git: Message 'src refspec master ne correspond à aucun paramètre#39; lors de la poussée des commits dans Git

Mots clés : gitgit-commitgit-clonegit-addgit-refspecgit

meilleur 4 Réponses Git: Message 'src refspec master ne correspond à aucun paramètre#39; lors de la poussée des commits dans Git

vote vote

92

mkdir repo && cd repo git remote add origin /path/to/origin.git git add . 
git push -u origin master error: src refspec master does not match any. 
git commit -m "initial commit" git push origin master 
vote vote

86

git push origin HEAD:<remoteBranch>  
vote vote

79

error: src refspec master does not match any. error: failed to push some refs to 'git@github ... .git' 
touch README git add README  git add (all other files) git commit -m 'reinitialized files' git push origin master --force  # <- caution, --force can delete others work. 
vote vote

69

git push -u origin master error: src refspec master does not match any. 
git commit -m "initial commit"  git push origin master 

Questions similaires