How to Fix Error Src Refspec Main Does Not Match Any - Failed to Push Some Refs to Github Repository

Опубликовано: 01 Декабрь 2024
на канале: SoftTrick
94
2

Method 1 Commands Below:-

git add .

git commit -m "Your Message Here"

git push origin main

Method 2 Commands Below:-

git add .

git commit -m "Your Message Here"

git push origin HEAD:main

Method 3 Commands Below:-

git add .

git commit -m "Your Message Here"

git push origin HEAD:master




In This Video We Will See How to Fix Error Src Refspec Main Does Not Match Any or Failed to Push Some Refs to Github Repository

Here Are The Steps to Fix Error Src Refspec Main Does Not Match Any or Failed to Push Some Refs to Github Repository

Method 1

1. Type Command git add . & Hit Enter on Your Keyboard
2. Type Command git commit -m "Your Message Here" & Hit Enter on Your Keyboard
3. Type Command git push origin main & Hit Enter on Your Keyboard
4. Done!


Method 2

1. Type Command git add . & Hit Enter on Your Keyboard
2. Type Command git commit -m "Your Message Here" & Hit Enter on Your Keyboard
3. Type Command git push origin HEAD:main & Hit Enter on Your Keyboard
4. Done!


Method 3

1. Type Command git add . & Hit Enter on Your Keyboard
2. Type Command git commit -m "Your Message Here" & Hit Enter on Your Keyboard
3. Type Command git push origin HEAD:master & Hit Enter on Your Keyboard
4. Done!