Home > Back-end >  why is git pull request not working and i always get errors?
why is git pull request not working and i always get errors?

Time:02-11

when i use git pull command I came with an error as below image showing error

CodePudding user response:

You need to have an active & tracking branch to pull from, As of this moment, you don’t have one set up.

To confirm an active & track a branch:

git branch --set-upstream-to=origin/‹branch› main

More Information on git pull: https://www.freecodecamp.org/news/git-pull-explained/amp/

CodePudding user response:

It seems you are trying to pull from an unknown branch.

You can try pull from master branch

git pull origin master

Or you can pair your local master branch with remote master branch using

git branch --set-upstream-to=origin/master master

After setting upstream, normal "git pull" command will work. You don't have to specify branch name with "git pull".

  • Related