fatal:The current branch master has no upstream branch
See original GitHub issueWhenever I try to push, i get this message.
Then, I go Git>Open Terminal and run:
git push origin master
And everything works smoothly.
Issue Analytics
- State:
- Created 5 years ago
- Comments:16 (5 by maintainers)
Top Results From Across the Web
fatal: The current branch master has no upstream branch
fatal: The current branch has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream...
Read more >git fatal: The current branch has no upstream branch
If you see the message “the current branch has no upstream” in your command window, it means you've tried to git push to...
Read more >How to fix fatal:the current branch master has no upstream ...
The fatal: The current branch master has no upstream branch error occurs when you have not configured git in such a way that...
Read more >Git Fixes: The Current Branch Has No Upstream Branch
fatal: The current branch <branchname> has no upstream branch. To push the current branch and set the remote as upstream, use git push ......
Read more >Fix Git's "fatal: no upstream branch" error quickly example
Git's 'no upstream branch' error can easily be fixed by setting the upstream branch to origin. Branch has no upstream fix commands. The...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Had the same issue with “The current branch master has no upstream branch” on push into empty repo on AWS SageMaker JupyterLab.
Going into Terminal, cd from home to SageMaker and than to my repo folder. Then
git push origin master
and after that GUI starts working for everything when a proper folder with repo is selected in the file browser extension.It looks like AWS SageMaker presents folder ~/SageMaker as home in the browser, while git extension considers ~/ to be home dir and as a result, it can not find the folder with git repo to push.
When I select another folder in the file browser extension and then go to the git extension and try to stage and push changes, it considers that selected folder to be git repo folder, and as it is not really git repo folder it throws push failed with no error message.
Hope this might help.
It’s usually helpful if you provide more context than I just did it - e.g. copy and paste the exact commands you ran and the unabridged output.
Since we don’t know what you actually did, could you paste the output of the following commands: