Can't undo discard with ruby-on-rails


I’m working with Atom and Git in a Ruby on Rails project. Unfortunately today I discarded unstaged changes on my development.sqlite3 database. I tried to recover via “Undo Discard” but was not successful. A merge conflict appears and the Atom console says:

GitError: git -c color.ui=false -c color.status=false -c color.showBranch=false -c color.diff=false -c color.branch=false merge-file -p db/development.sqlite3 /private/var/folders/4r/4dj62r992jd05pwt8y9h29jw0000gn/T/github-discard-history-118028-13442-17wmext.0ll9ykfbt9/db/development.sqlite3-after-discard /private/var/folders/4r/4dj62r992jd05pwt8y9h29jw0000gn/T/github-discard-history-118028-13442-17wmext.0ll9ykfbt9/db/development.sqlite3-before-discard -L current -L after discard -L before discard in /Users/xxx exited with code 255 stdout: stderr: error: Cannot merge binary files: db/development.sqlite3

at new GitError (/Applications/
at /Applications/
at ()
at step (/Applications/
at /Applications/
(anonymous) @ :104770 step @ :104089 (anonymous) @ :104089

Is there any possibility to rescue my last state? I know that rails db and merging conflicts are a special thing but I hope to get rid of it. I don’t want to loose hours of work.



I am not a pro git user, but that sounds fairly final. The unstaged changes were in a file that git can’t actually see inside, so it can’t do its normal trick of tracking lines that have changed.