When doing a git-merge or git-pull with local untracked files that have been added remotely, the following error appears
error: The following untracked working tree files would be overwritten by merge:
Many questions have been asked about this, but all that I found wanted to overwrite the local files. However, I want to get a diff, i.e. merge the files to make sure nothing gets lost.
How could I achieve that automatically, without processing the files one by one?
I see two options for you:
commit untracked files
git mergemove untracked files aside
git mergewill put the new files in place.git diffwill show you now the differences between your version and the version you just merged in.