Be careful - you have case mixing between local and remote branch!
Suppose you are in local branch downloadmanager now (git checkout downloadmanager)
You have next options:
Specify remote branch in pull/push commands every time (case sensitive):
git pull origin DownloadManageror
git pull origin downloadmanager:DownloadManager
Specify tracking branch on next push:
git push -u origin DownloadManager(-u is a short form of --set-upstream)
this will persist downloadmanager:DownloadManager link in config automatically (same result, as the next step).
Set in git config default remote tracking branch:
git branch -u downloadmanager origin/DownloadManager(note, since git 1.8 for branch command -u is a short form of --set-upstream-to, which is a bit different from deprecated --set-upstream)
or edit config manually (I prefer this way):
git config --local -e-> This will open editor. Add block below (guess, after "master" block):
[branch "downloadmanager"] remote = origin merge = refs/heads/DownloadManager
and after any of those steps you can use easily:
git pull
If you use TortoiseGit: RightClick on repo -> TortoiseGit -> Settings -> Git -> Edit local .git/config
Answer from radistao on Stack Overflow[SOLVED]
Well, it's my first time dealing with this "Git interface". After using commands like:
"git init"
"git remote add origin [link of my repository on Github with that ".git" after its link]"
I tried to make that "pull" command:
"git pull origin master"
however, it's probably not working due to this warning thrown by the terminal:
"fatal: couldn't find remote ref master"
Why is this error happening? How should I fix it?
Is the remote branch actually called "master"?
Have you created the repository on GitHub? It's seems you've created the local repo with git init but you need the remote repo created as well.
Be careful - you have case mixing between local and remote branch!
Suppose you are in local branch downloadmanager now (git checkout downloadmanager)
You have next options:
Specify remote branch in pull/push commands every time (case sensitive):
git pull origin DownloadManageror
git pull origin downloadmanager:DownloadManager
Specify tracking branch on next push:
git push -u origin DownloadManager(-u is a short form of --set-upstream)
this will persist downloadmanager:DownloadManager link in config automatically (same result, as the next step).
Set in git config default remote tracking branch:
git branch -u downloadmanager origin/DownloadManager(note, since git 1.8 for branch command -u is a short form of --set-upstream-to, which is a bit different from deprecated --set-upstream)
or edit config manually (I prefer this way):
git config --local -e-> This will open editor. Add block below (guess, after "master" block):
[branch "downloadmanager"] remote = origin merge = refs/heads/DownloadManager
and after any of those steps you can use easily:
git pull
If you use TortoiseGit: RightClick on repo -> TortoiseGit -> Settings -> Git -> Edit local .git/config
This error happens because of local repository can't identify the remote branch at first time. So you need to do it first. It can be done using following commands:
git remote add origin 'url_of_your_github_project'
git push -u origin master
fatal: coudn't find remote ref master
brew update throws " couldn't find remote ref refs/heads/master"
Failed `doom upgrade` - fatal: couldn't find remote ref refs/heads/master
Fatal : couldn't find remote ref
How do I fix fatal couldn't find remote ref main?
Why does Git show couldn't find remote ref master?
What causes the error 'fatal: couldn't find remote ref main' in Git?
Hello
As I Trying To Upload The Files which Are Present In My Local Machine To Git Hub Repository.The Above Error Was Showing And I Tried To Use " git push origin master -- force" It's Not Working. Any Suggestions.....??
The Files I Am Trying To upload are Belongs To Project which I had done in my final semester.
Required Components For The project To work are :
Python 3.7🐍 and Various Libraries
I Have Only Tried To Complie this Project in My Local Machine But I Want To shift My Entire Project To Work In My Git Repo.So I Created a repo exclusive for my project and the thing is it contains various libraries to work so I tried to upload the site packages and script to my git repo but it's not working.
Care To Give any suggestions.