%% date:: [[2023-01-03]] %% # [[No such ref was fetched error in Git]] This is an error in [[Git]] that you might come across if you try to do a `git pull`. The full text of the error reads: ```shell Your configuration specifies to merge with the ref 'refs/heads/post/load-testing-websites' from the remote, but no such ref was fetched. ``` This occurs when you've specified an upstream branch using `git config`, but the remote branch you specified doesn't exist as spelled. [^stackoverflow] ## Solutions ### Verify that the branch exists Double-check whether the remote branch exists. You've likely misspelled it. ### Unset upstream branch ```shell git branch --unset-upstream ``` This should remove the incorrect configuration. ### Set the correct branch ``` git pull --set-upstream-to=origin/correct-branch-name ``` This command sets the correct branch as your upstream branch. [^stackoverflow]: Multiple users, Stack Overflow. (2016). *Your configuration specifies to merge with branch name from the remote, but no such ref was fetched?* Retrieved from https://stackoverflow.com/questions/36984371/your-configuration-specifies-to-merge-with-the-branch-name-from-the-remote-bu