Hi,
I typed git remote add origin.... (and my https to the repository)
Then I typed git push -u origin master
I got an error saying rejected. I attach the snapshot.
How can I fix this?
Thank you.
Best regards,
Veronica
Welcome to Atlassian Community !!
From the error i could see that the remote changes are way forward(means there are already changes pushed to remote and your local is outdated). To fix this you can take a git fetch from remote and then push the code.
Regards,
Vishwas
Hi Vishwas,
Thank you.
How do I do that? I am a beginner.
Regards,
Veronica
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey
Not a problem, I will guide you.
My guess you are doing commands to do git operations ?
just run this command:
git fetch
and then
git push -u origin master
Let me know in case of any issues.
Regards,
Vishwas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I did it and I still got an error.
After the git fetch it gave some info.
Then I did the git push -u origin master and got this:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am still stuck and unable to push the files to my repo.
The only difference is that the error message changed.
Could you please help me?
Thank you very much.
Kind regards,
Veronica Chiaravalli
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey,
I guess this is not allowing with just a fetch command we have to run git pull and then run git push.
As mentioned in this article https://stackoverflow.com/questions/57664991/bitbucket-error-failed-to-push-some-refs#:~:text=This%20is%20usually%20caused%20by,push%20%2D%2Dhelp'%20for%20details.
You may have to run this command:
git pull origin master --allow-unrelated-histories
Please check this out, let me know any issues.
Regards,
Vishwas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.