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

Push rejected by server

rihab ayari January 14, 2021

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 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? 

rihab ayari January 15, 2021

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
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 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
AUG Leaders

Atlassian Community Events