“SRC Refspec Main tidak cocok” Kode Jawaban

Kesalahan: SRC Refspec Master tidak cocok dengan apa pun. git

# You are trying to add an empty repository, add something first, like a readme
touch README.md
git add README.md
git commit -m "Initial commit"
git push --set-upstream origin master
Vast Vicuña

Kesalahan: SRC Refspec Master tidak cocok dengan apa pun.

git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin "_git repository link here_"
git push -u origin main
Super Sable

Kesalahan: SRC Refspec Master tidak cocok dengan kesalahan apa pun: Gagal mendorong beberapa referensi ke Android Studio

git commit -m "initial commit"
git push origin master
Confused Chinchilla

SRC Refspec Main tidak cocok

git init

git add .

git commit -m "YOUR FIRST MESSAGE HERE"

git branch -M main

git remote add origin _GIT_LINK_TO_PROJECT_HERE_

git push -u origin main
Frantic Ferret

Kesalahan: SRC Refspec Master tidak cocok

Try git show-ref to see what refs you have. Is there a refs/heads/master?
Due to the recent "Replacing master with main in GitHub" action, 
you may notice that there is a refs/heads/main. 
As a result, the following command may change from git push origin HEAD:master 
to git push origin HEAD:main

So try `git push origin main`
Matthew Edelen

SRC Refspec Main tidak cocok

### Maybe you just need to commit. I ran into this when I did:###

mkdir repo && cd repo
git remote add origin /path/to/origin.git
git add .
## Oops! Never committed!##

git push -u origin master
error: src refspec master does not match any.
### All I had to do was: ###

git commit -m "initial commit"
git push origin main
### Success! ###
Mushy Macaque

Jawaban yang mirip dengan “SRC Refspec Main tidak cocok”

Pertanyaan yang mirip dengan “SRC Refspec Main tidak cocok”

Lebih banyak jawaban terkait untuk “SRC Refspec Main tidak cocok” di Shell/Bash

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya