Weird error code when pushing

Hey, I tried to push a file but it printed out this weird error? When i do “git log” it shows me the correct commit but im not sure if it got pushed correctly. Also it shows me on the website that i passed the daily test but not the public test for the file??
komischer error

Did you push to the repository from another machine? If the remote repository contains changes that you do not have locally, e.g. because you worked on another machine in the mean time, git will not let you push your changes before you have integrated these changes first.

To merge the changes into your local repository, use git pull. Afterwards, you can push your changes.

No i did not push it from another machine. nothing is working right now i dont know what to do. i cant push anything anymore.

can you tell me what i pushed? i just did that thing with git pull and it still wont let me push anything. did i delete my pushed data with git pull?

git pull tells the computer: Look up what changes are there online. Fetch them, and try to incorporate the changes.
If the changes can not be incorporated, a merge begins that wants you to decide which change to keep. In this case, git will tell you to do so.

The original error message tells you that there is a version on the server with changes that are not in the repository from which you are trying to push.

You could do git pull and resolve the issue if this does not happen automatically (lookup a tutorial on how to merge changes with git).

Another way would be to do a git clone in a fresh directory and incorporate the new files by copying them by hand.
And then you should be able to push from there.

If these attempts do not work, you should visit the office hour on Monday in order to get help from a tutor.

1 Like