I am having a "weird" issue probably because I did something wrong or forgot to do something else but now each time I run the following command:
git checkout master && git pull origin master && git fetch -p
I got the following error:
Already on 'master'
From ssh://reponame
* branch master -> FETCH_HEAD
Already up to date.
fatal: Couldn't find remote ref refs/heads/global/CDP-5353_fix
I have tried the following (that I got from here):
E:\repo (master -> origin)
λ git branch -r | grep CDP-5353_fix
E:\repo (master -> origin)
λ git branch | grep CDP-5353_fix
Branch CDP-5353_fix
does not exists locally and/or remote.
E:\repo (master -> origin)
λ git branch --unset-upstream
E:\repo (master -> origin)
λ git checkout master && git pull origin master && git fetch -p
Already on 'master'
From ssh://reponame
* branch master -> FETCH_HEAD
Already up to date.
fatal: Couldn't find remote ref refs/heads/global/CDP-5353_fix
Same issue ...
E:\repo (master -> origin)
λ git branch -d -r origin CDP-5353_fix
error: remote-tracking branch 'origin' not found.
error: remote-tracking branch 'CDP-5353_fix' not found.
E:\repo (master -> origin)
λ git config --unset branch.CDP-5353_fix.remote
E:\repo (master -> origin)
λ git config --unset branch.CDP-5353_fix.merge
E:\repo (master -> origin)
λ git checkout master && git pull origin master && git fetch -p
Already on 'master'
From ssh://reponame
* branch master -> FETCH_HEAD
Already up to date.
fatal: Couldn't find remote ref refs/heads/global/CDP-5353_fix
Same issue ...
What I am missing here? The message is not messing up with my repo or anything on it but it is annoying. Any help?
UPDATE 1:
Output of git remote -v
:
λ git remote -v
origin ssh://reponame (fetch)
origin ssh://reponame (push)
Note: I am hiding the real repo name because it belongs to the company I work for and they don't like to share that kind of stuff.
UPDATE 2:
Output of git config --get-all remote.origin.fetch
:
λ git config --get-all remote.origin.fetch
+refs/heads/*:refs/remotes/origin/*
+refs/heads/CDP-5288:refs/remotes/origin/CDP-5288
+refs/heads/CDP-5299:refs/remotes/origin/CDP-5299
+refs/heads/global/CDP-5353_fix:refs/remotes/origin/global/CDP-5353_fix
...