I am working with the Neptune 3 UI Qt repo. I want migrate the repository to my own remote. However, running git push [myremote] [branch] I get:
Unable to find source for object 3a03e4a5276156644ceb88328db71b548f1d1a688bd0f6fd08c286ed30caa126 (try running git lfs fetch --all)
error: failed to push some refs to '[remote-url]'
git lfs fetch --all throws the following error for a few hundred objects:
fetch: 1122 object(s) found, done.
fetch: Fetching all references...
[09bd96ab35f610cdbdf84cc4b49a850c6af37d205c43c5e053a21ea6d37ccd6f] Object '09bd96ab35f610cdbdf84cc4b49a850c6af37d205c43c5e053a21ea6d37ccd6f' not found: [404] Object '09bd96ab35f610cdbdf84cc4b49a850c6af37d205c43c5e053a21ea6d37ccd6f' not found
...
After further analyzing the relevant commits with git log -p -S, it turns out that these LFS files have been replaced by newer ones, for instance:
commit 86b5980f8f8ad1ccb936b8207426ff54c262d872
Author: Bramastyo Harimukti Santoso <[email protected]>
Date: Mon Oct 15 17:27:20 2018 +0200
[map] update the offline map cache to support the current styles
- the old map cache cannot be loaded as it doesn't have the dark
and light theme styles of neptune 3, hence, it needs to be
updated
Change-Id: Ib6640723d0090fc488e22c6808e47af9c7b6e40e
Reviewed-by: Lukáš Tinkl <[email protected]>
diff --git a/apps/com.pelagicore.map/maps/mapboxgl.db b/apps/com.pelagicore.map/maps/mapboxgl.db
index fc84344d..7291d76e 100644
--- a/apps/com.pelagicore.map/maps/mapboxgl.db
+++ b/apps/com.pelagicore.map/maps/mapboxgl.db
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:09bd96ab35f610cdbdf84cc4b49a850c6af37d205c43c5e053a21ea6d37ccd6f
-size 103964672
+oid sha256:67d18923a064b1102451e864010b793a412b339d7d38682abd47a5641e4fa3ca
+size 52367360
Is there a way to correct this problem or ignore the old LFS references and push to my own remote?
Edit: As I did not need the version history, I simply migrated a shallow copy of the latest state as desribed at How to push a shallow clone to a new repo?