Create
cancel
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

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

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

 

Thanks!

John

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!

@patrickholzer 

Can you give the output of:

git status

 from your repo folder.

Suggest an answer

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

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,710 views 10 16
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