{
    "version": "https:\/\/jsonfeed.org\/version\/1.1",
    "title": "Discover Docker, K8s and Hashicorp Nomad with Maksym Prokopov: posts tagged github",
    "_rss_description": "The blog about containerisation, virtual machines and useful shell snippets and findings",
    "_rss_language": "en",
    "_itunes_email": "",
    "_itunes_categories_xml": "",
    "_itunes_image": "",
    "_itunes_explicit": "",
    "home_page_url": "https:\/\/blog.it-premium.com.ua\/tags\/github\/",
    "feed_url": "https:\/\/blog.it-premium.com.ua\/tags\/github\/json\/",
    "icon": false,
    "authors": [
        {
            "name": "Maksym Prokopov",
            "url": "https:\/\/blog.it-premium.com.ua\/",
            "avatar": false
        }
    ],
    "items": [
        {
            "id": "204",
            "url": "https:\/\/blog.it-premium.com.ua\/all\/how-to-remove-broken-lfs-assets-from-git-repo\/",
            "title": "How to remove broken LFS assets from git repo.",
            "content_html": "<p>Sometimes you can get error similar to this<br \/>\nObject does not exist on the server: [404] Object does not exist on the server<\/p>\n<p>That means you messed with upload of your artifacts to LFS and they changed at some point and being commited to repo.<br \/>\nThe only way to fix that is to remove these files from commit, that will overwrite your history, hense you have to push your branch with --force flag to overwrite your remote repository.<\/p>\n<p>So here is your hard way to fix that:<\/p>\n<ol start=\"1\">\n<li>Search for the commit that contains your assets. In my case it is Runtime\/platforms\/hpux\/hpux_rebuilt.tar<\/li>\n<\/ol>\n<pre class=\"e2-text-code\"><code class=\"\">git log --raw --all --full-history -- Runtime\/platforms\/hpux\/hpux_rebuilt.tar<\/code><\/pre><pre>\ntree 901cb036d4dfef5c36c66d6452b3d496d0e22772\nparent 19848337754164ea17afcd1eb7bd55ef512b3c34\nauthor Maksym Prokopov <mprokopov@gmail.com> 1548405977 +0700\ncommitter Maksym Prokopov <mprokopov@gmail.com> 1548405977 +0700\n\nadded script clause\n<\/pre>\n<p>search your file with<\/p>\n<pre class=\"e2-text-code\"><code class=\"\">git cat-file -p 901cb and drill down until you find your assed blob sha1<\/code><\/pre><pre>\n100644 blob 496ee2ca6a2f08396a4076fe43dedf3dc0da8b6d\t.gitignore\n040000 tree 1c93b94f6ec752528a46741a7ff94e81d46afdcf\tAppServer\n040000 tree b32efb40aa560188970fc4f470c697e06f7c7030\tBuild\n100644 blob 050d454e84afc229f35144ef8f13087c58d11f8a\tJenkinsfile_AppServer_Cobol\n040000 tree ceac52278585b596885410e38021bbcbb95cd7b6\tRuntime\n<\/pre>\n<pre class=\"e2-text-code\"><code class=\"\">git cat-file -p ceac52<\/code><\/pre><pre>040000 tree ff05d245ea0782b43355affc5fe8237ec8619bdc\tplatforms<\/pre>\n<pre class=\"e2-text-code\"><code class=\"\">git cat-file -p ff05d245ea0782<\/code><\/pre><pre>\n040000 tree c9c55c219bc5cf5436cdb4d4dcf761a088677bc2\taix\n040000 tree 65cc3c3899d9bfecbf95999fdaed24c2235fc887\thpux\n040000 tree 13bada715fbde55b9d1e3be0aa0c82a8ed886ca0\tintel_nt\n040000 tree ad1b0ec603f2895a91a3241fa3ad034c97645b44\tsolaris\n<\/pre>\n<pre class=\"e2-text-code\"><code class=\"\">git cat-file -p 65cc3c3899d9bfecbf95999fda<\/code><\/pre><pre>\n040000 tree 3477a0392bd9733297c52284a85776bf2461f7d8\tSDK\n100644 blob ae6c4b1828104c732c36a680c5b298fb5769fbaf\tcshp1_list\n040000 tree 1bfe688c02bbf87836d70709318d750b89f17f6a\texec\n100644 blob 808487ec8d13531604c58a632dec9373c2629647\texecutables_list\n100644 blob f2033d65e09b598f6a19e141cae59c980f8595ae\thpux_rebuilt.tar\n100644 blob 82cf5d66ffdecde3f059f9bc9914f1fc8498b5f0\tnon_executables_list\n040000 tree 182465cb595fa768df9376f558110eff8cc88afc\tsbin\n<\/pre>\n<p>here is your blob id<\/p>\n<pre>100644 blob f2033d65e09b598f6a19e141cae59c980f8595ae\thpux_rebuilt.tar<\/pre>\n<ol start=\"2\">\n<li>Find assets blog_id. Put their blob_id to some file.<\/li>\n<\/ol>\n<p>Put f2033d65e09b598f6a19e141cae59c980f8595ae to blob-ids file<\/p>\n<p>Repeate step 1 for every file your’re missing.<\/p>\n<ol start=\"3\">\n<li>Download and execute (<a href=\"https:\/\/rtyley.github.io\/bfg-repo-cleaner\/\">https:\/\/rtyley.github.io\/bfg-repo-cleaner\/<\/a> BFG utility) with flag -bi and your file with blob ids.<\/li>\n<\/ol>\n<pre class=\"e2-text-code\"><code class=\"\">java -jar ~\/Downloads\/bfg-1.13.0.jar -bi blob-ids<\/code><\/pre><ol start=\"4\">\n<li>Revert last commit and remove files.<br \/>\nYou’ll see<\/li>\n<\/ol>\n<pre>\nUpdating references:    100% (10\/10)\n...Ref update completed in 15 ms.\n\nCommit Tree-Dirt History\n------------------------\n\n\tEarliest                                              Latest\n\t|                                                          |\n\tDmDmDDmDmDmmDmDmDDDmmDmDmDmDDDmDmDmmDmDmDDDmDmDmDmDDmDDmmmDm\n\n\tD = dirty commits (file tree fixed)\n\tm = modified commits (commit message or parents changed)\n\t. = clean commits (no changes to file tree)\n\n\t                        Before     After\n\t-------------------------------------------\n\tFirst modified commit | 39384790 | 5c5a7a09\n\tLast dirty commit     | 71d09db3 | 495a1329\n\nDeleted files\n-------------\n\n\tFilename                  Git id\n\t------------------------------------------\n\t15schemas.tar           | b795d231 (134 B)\n\tciar_vb4_15.tar         | 2d06bbb5 (133 B)\n\tciar_xsl_15.tar         | 26c79c30 (132 B)\n\tcivt_vb4_15.tar         | 23d54549 (132 B)\n\tcivt_xsl_15.tar         | 7201bc36 (131 B)\n\tmysql.tar               | e3d9d62d (131 B)\n\twrunora.15.1.0.0_11.2.0 | d752af96 (133 B)\n\n<\/pre>\n<p>In total, 109 object ids were changed. Full details are logged here:<\/p>\n<ol start=\"5\">\n<li>Redo commit.<\/li>\n<li>Execute git garbage collection.<\/li>\n<\/ol>\n<pre class=\"e2-text-code\"><code class=\"\">git reflog expire --expire=now --all &amp;&amp; git gc --prune=now --aggressive<\/code><\/pre><ol start=\"7\">\n<li>Push your changes with --force to remote repo.<\/li>\n<\/ol>\n<pre class=\"e2-text-code\"><code class=\"\">git push origin --force<\/code><\/pre><p>If you want to re-add LFS files<br \/>\nyou can do it with<\/p>\n<pre class=\"e2-text-code\"><code class=\"\">git lfs track &quot;filename&quot;<\/code><\/pre>",
            "date_published": "2019-02-01T09:02:36+01:00",
            "date_modified": "2019-02-01T09:04:47+01:00",
            "tags": [
                "git",
                "git-lfs",
                "github"
            ],
            "_date_published_rfc2822": "Fri, 01 Feb 2019 09:02:36 +0100",
            "_rss_guid_is_permalink": "false",
            "_rss_guid": "204",
            "_e2_data": {
                "is_favourite": false,
                "links_required": [
                    "highlight\/highlight.js",
                    "highlight\/highlight.css"
                ],
                "og_images": []
            }
        },
        {
            "id": "25",
            "url": "https:\/\/blog.it-premium.com.ua\/all\/besplatny-hosting-dlya-sayta-na-github\/",
            "title": "Бесплатный хостинг для сайта на github",
            "content_html": "<p>Для примера <a href=\"http:\/\/tonskiy.me\">http:\/\/tonskiy.me<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/tonsky\/tonsky.github.io\">https:\/\/github.com\/tonsky\/tonsky.github.io<\/a><\/p>\n<p><a href=\"http:\/\/tonsky.me\">http:\/\/tonsky.me<\/a><\/p>\n",
            "date_published": "2015-09-18T12:08:54+01:00",
            "date_modified": "2015-09-18T12:09:30+01:00",
            "tags": [
                "github",
                "хостинг"
            ],
            "_date_published_rfc2822": "Fri, 18 Sep 2015 12:08:54 +0100",
            "_rss_guid_is_permalink": "false",
            "_rss_guid": "25",
            "_e2_data": {
                "is_favourite": false,
                "links_required": [],
                "og_images": []
            }
        }
    ],
    "_e2_version": 4134,
    "_e2_ua_string": "Aegea 11.3 (v4134)"
}