git keeps complaining about non existing master on remote...?

134 views Asked by At

When I try to fo a git pull, I get:

Your configuration specifies to merge with the ref 'refs/heads/master'
from the remote, but no such ref was fetched.

when I'm on master. I have tried:

  • git reset --soft HEAD
  • git branch --unset-upstream & git pull --set-upstream-to=origin/correct-branch-name (as well as with: git pull --set-upstream origin master

but nothing seems to work, the remote is small, there's only three branches on this trepository.... can anyone give me a hand with this?

UPDATE1

$ git branch -r
  origin/HEAD -> origin/master
  origin/added_RGB_led
  origin/button_features
  origin/master
]$ git fetch --prune origin
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I do have the correct permissions setup, this is new...

$ git ls-remote origin
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

So I tried to do fresh clone and got the following:

$ git clone [email protected]:organisation/Repo.git
Cloning into 'Repo'...
remote: Enumerating objects: 193, done.
remote: Counting objects: 100% (193/193), done.
remote: Compressing objects: 100% (107/107), done.
remote: Total 193 (delta 62), reused 175 (delta 45), pack-reused 0
Receiving objects: 100% (193/193), 41.66 KiB | 804.00 KiB/s, done.
Resolving deltas: 100% (62/62), done.
fatal: bad object refs/heads/master
fatal: remote did not send all necessary objects
$ cd Repo/
$ git status
fatal: not a git repository (or any parent up to mount point /home/user)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

I'm really not sure what's going on, this all looks very odd to me

1

There are 1 answers

0
Antonio Petricca On

It is a very strange issue.

I can only suggest you to do what git pull does behind the scenes:

git fetch
git merge origin/master