Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

fatal: The current branch master has no upstream branch.

When I try:

$ git push

I get this in my Terminal:

fatal: The current branch master has no upstream branch

I use Terminal on Mac OS 10.15 (Catalina).

I could not find out the reason. Can you help? Thank you in advance.

2 answers

Good day,

Its because you haven't defined the upstream branch, please try the below command instead.

$ git push origin <branch_name>

If you are trying to modify master branch it would be:-

$ git push origin master




Hi John

Thank you for your reply. I tried:

$ git push origin master

The terminal doesn't do anything. No upload.

I tried:

git commit -m "Update"

Terminal reply:

[master a3a92db] index

1 file changed, 1 insertion(+)

So far, so good. But once I try to push, nothing happens. No password request. No error message either.

Is it because I use 2-step-authentication?

Also, in my terminal I have:

git version 2.23.0

Thank you!


Can you give the output of:

git status

 from your repo folder.

Hi John, I wanted to follow up on this (if you still have time to look at it):

The output of git status is:

On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)

The "push"-command is still just hanging in my terminal… nothing happening.

thank you!

… and below the above output one more line:

nothing to commit, working tree clean

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,849 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you