Im using github desktop for a project for one of my classes, whenever i try to pull origin, i get this error
-
In general [Why not upload images of code/errors when asking a question?](https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-errors-when-asking-a-question) .. and then this error basically means that you have local changes on the branch so you can't pull from the remote repository without specifying what shall happen with such conflicting files ... in your case however usually the `Logs` shouldn't be included in the repository in the first place anyway -> Use a proper [`.gitignore`](https://github.com/github/gitignore/blob/main/Unity.gitignore) for your project! – derHugo Feb 16 '22 at 10:15
1 Answers
When you do a git pull origin master, git pull performs a merge, which often creates a merge commit. Therefore, by default, pulling from the remote is not a harmless operation: it can create a new commit SHA hash value that didn’t exist before. This behavior can confuse a user, because what feels like it should be a harmless download operation actually changes the commit history in unpredictable ways.
To avoid this, you need
git pull --ff-only (or not? read on to see which one fits your requirements)
With git pull --ff-only, Git will update your branch only if it can be “fast-forwarded” without creating new commits. If this can’t be done, git pull --ff-only simply aborts with an error message.
You can configure your Git client to always use --ff-only by default, so you get this behavior even if you forget the command-line flag:
git config --global pull.ff only Note: The --global flag applies the change for all repositories on your machine. If you want this behaviour only for the repository you're in, omit the flag.
Taken from here https://blog.sffc.xyz/post/185195398930/why-you-should-use-git-pull-ff-only-git-is-a

- 21
- 5
-
Copying answers... You mean, taken from here: https://stackoverflow.com/a/62653400/13866925 ? – DGF Apr 14 '22 at 13:48