Recently, I tried to create a GitHub repository to record some code I encountered during my learning process, but I frequently encountered the following issue when uploading.
After entering git pull, this situation would occur.
While writing this article, I realized that it might be because I modified the readme file, but the solution I proposed is not this.
At that time, I searched for a while and finally found the solution at https://blog.csdn.net/L_smwy/article/details/121400574.
I used solution two, but first backed up some things locally.
Then I put the backed-up items back and re-uploaded, which resolved the issue.
It seems that the problem was likely due to modifying the readme file locally. I modified it because I noticed that the downloaded readme was missing a line compared to what was written on GitHub. It seems that this thing shouldn't be modified locally.