fr0tt / benotes

An open source self hosted notes and bookmarks taking web app.
https://benotes.org
MIT License
746 stars 48 forks source link

Cannot pull - Cannot stash #96

Closed roughnecks closed 1 year ago

roughnecks commented 1 year ago

Hello,

I was pulling my github clone and I got this:

git pull                                                                                                                    [40/43122]
Updating cd3a1cc..4e1dfc6
error: Your local changes to the following files would be overwritten by merge:
        public/fonts/Inter-Black.woff
        public/fonts/Inter-Black.woff2
        public/fonts/Inter-BlackItalic.woff
        public/fonts/Inter-BlackItalic.woff2
        public/fonts/Inter-Bold.woff
        public/fonts/Inter-Bold.woff2
        public/fonts/Inter-BoldItalic.woff2
        public/fonts/Inter-ExtraBold.woff
        public/fonts/Inter-ExtraBold.woff2
        public/fonts/Inter-ExtraBoldItalic.woff
        public/fonts/Inter-ExtraBoldItalic.woff2
        public/fonts/Inter-ExtraLight.woff2
        public/fonts/Inter-ExtraLightItalic.woff2
        public/fonts/Inter-Italic.woff2
        public/fonts/Inter-Light.woff
        public/fonts/Inter-Light.woff2
        public/fonts/Inter-LightItalic.woff
        public/fonts/Inter-LightItalic.woff2
        public/fonts/Inter-Medium.woff2
        public/fonts/Inter-MediumItalic.woff
        public/fonts/Inter-Regular.woff
        public/fonts/Inter-Regular.woff2
        public/fonts/Inter-SemiBold.woff2
        public/fonts/Inter-SemiBoldItalic.woff
        public/fonts/Inter-ThinItalic.woff
        public/fonts/Inter-ThinItalic.woff2
        public/fonts/Inter-italic.var.woff2
        public/fonts/Inter-roman.var.woff2
        public/fonts/Inter.var.woff2
        public/logo_144x144.png
Please commit your changes or stash them before you merge.
Aborting

I tried to git restore <file> to no avail. Also tried to git stash and this is the output I get:

git stash
warning: in the working copy of 'public/fonts/Inter-Black.woff', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter-Black.woff2', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter-BlackItalic.woff', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter-BlackItalic.woff2', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter-Bold.woff', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter-Bold.woff2', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter-BoldItalic.woff2', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter-ExtraBold.woff', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter-ExtraBold.woff2', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter-ExtraBoldItalic.woff', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter-ExtraBoldItalic.woff2', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter-ExtraLight.woff2', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter-ExtraLightItalic.woff2', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter-Italic.woff2', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter-Light.woff', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter-Light.woff2', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter-LightItalic.woff', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter-LightItalic.woff2', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter-Medium.woff2', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter-MediumItalic.woff', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter-Regular.woff', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter-Regular.woff2', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter-SemiBold.woff2', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter-SemiBoldItalic.woff', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter-ThinItalic.woff', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter-ThinItalic.woff2', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter-italic.var.woff2', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter-roman.var.woff2', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/fonts/Inter.var.woff2', CRLF will be replaced by LF the next time Git touches it
warning: in the working copy of 'public/logo_144x144.png', CRLF will be replaced by LF the next time Git touches it
Saved working directory and index state WIP on master: cd3a1cc improve chances of successfully gather a response

On the next pull it still tells me the same thing. Please commit your changes or stash them before you merge. Aborting

Please advice. Thanks

roughnecks commented 1 year ago

You can replicate by:

git clone --branch v2.7.1 https://github.com/fr0tt/benotes.git

Then go on with the installation and finally:

git checkout master

Same issue

fr0tt commented 1 year ago

I changed the line endings of the binary files to align with the rest of the files (that's the "CRLF will be replaced by LF"). Git isn't exactly helpful with auto resolving binary files. I'm sorry for the inconvenience. I tried a couple of ways to make it smoother but they all failed and I have to change it eventually anyways.

The fix is however rather simple: rm -R public/fonts && rm public/logo_144x144.png or just rm -R public This removes all conflicting files and simply fetches the newest version of them from GitHub.

roughnecks commented 1 year ago

Nice, solved.