You asked to pull from the remote but did not specify the branch github error

asked to pull from remote but did not specify the branch github error

Mostly, you got a new repository or even existing one and you are trying to interact with it.

The above problem would be happening this time.

Git would allow you to have many branches of the same repository. So when you try to interact with the repository and you didn’t specify which branch then this would be the problem.

Because this is not the default configured remote
for your current branch, you must specify a branch on the command line

The tasks you are trying to do might be

git pull
git push or even others.

Solution

The first thing you want to do would be to check what branch you are in.

git branch

If you see master in there * master then do

git pull origin master

This would take care of the problem