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

Push rejected by server

Hello Team,

I have this problem when i was pushing the projet to the Talend CLOUD:

"Push rejected by server because your local Git Repository is out of sync with the remote server "

 and i can't pull and merge to update it.

I'm blocked and it's very urgent.

Can you help me please.

Thank you in advance.

1 answer

1 accepted

0 votes
Answer accepted
Mikael Sandberg Community Leader Jan 14, 2021

Hi @rihab ayari,

Welcome to Atlassian Community!

When you get that error when pushing it means that your local repository do not have all the commits that your remote repository does, and the only way to solve it is to do a pull first. You mentioned that you cannot do a pull and merge, could you explain more? Do you get an error message when trying to do a pull? 

Hello @Mikael Sandberg 

Thank you so much for your answer

I have this problem when i was pushing the projet to the Talend CLOUD:

"Push rejected by server because your local Git Repository is out of sync with the remote server "
and when i did a pull and merge from talend data integration i get this message :

pull and merge.PNG

i found some commands to try but it's my first time working with git so i don't have idea where i must put this command:

git fetch origin && git reset --hard origin/master && git clean -f -d

Thank you in advance.

Mikael Sandberg Community Leader Jan 15, 2021

Okay, so the commands you found will reset your local branch, before you do that make sure that you have saved your commits, if you have any. The easiest way to do that is create a new branch, and then switch back to your master branch and then reset it.

Suggest an answer

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

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

85 views 2 3
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