Git throws error: src refspec master does not match any, due to a number of reasons and most common are – Wrong or spelling mistake in branch name, using older ‘master’ instead of ‘main’, or forgot commit before pushing.

Steps to follow

1. Commit before pushing to branch

2. Windows expect commit messages to be in double quotes.

3. Check if you are committing empty directory

4. Check your local and remote branch names

5. Check if branch exists

6. Check for what refs you have

#git #error #git error #git short

Error: Src Refspec Master Does Not Match any
2.50 GEEK