0

enter image description here

So I keep getting this error when I try to push existing changes onto my github repo. This started after I created a README.md file after I noticed my repo did not have one on the github repo. Does this usually happen? If so whats the best way to fix this. I tried to delete the readme file but I definitely bugged something.

RSD
  • 87
  • 9
Samee_code
  • 31
  • 7
  • Would you be able to do a 'git pull' and then fix your code to resolve any potential merge conflicts and then push it? That usually resolves this issue. – Roe hit Feb 16 '22 at 22:09
  • I tried to pull it gives me a fatal error: couldnt find remote ref master – Samee_code Feb 16 '22 at 22:13
  • 1
    You branch is called main, not master - so that’s expected – AD7six Feb 16 '22 at 22:39
  • https://stackoverflow.com/search?q=%5Bgit%5D+hint%3A+Updates+were+rejected+because+the+remote+contains+work+that+you+do – phd Feb 16 '22 at 23:38

1 Answers1

0

First run: git pull origin main

Then run: git push origin main

RSD
  • 87
  • 9