{"id":2266,"date":"2022-02-26T11:21:17","date_gmt":"2022-02-26T11:21:17","guid":{"rendered":"https:\/\/sezeromer.com\/?p=2266"},"modified":"2023-03-04T14:03:35","modified_gmt":"2023-03-04T11:03:35","slug":"github-large-file-storage","status":"publish","type":"post","link":"https:\/\/sezeromer.com\/en\/github-large-file-storage\/","title":{"rendered":"Github Large File Storage"},"content":{"rendered":"<p>Hello friends, in this article, we will talk about the solution of a problem experienced while assigning the projects we created to <strong>Github<\/strong>.<\/p>\n<p>In the projects we develop, sometimes it is necessary to add the files with high size to the source code and submit them to Github. In cases where we do not throw, other teammates may get errors or may not get builds when we use CI\/CD. This can cause a lot of trouble.<\/p>\n<p>If I go through my own scenario, some files in the RealmSwift pod I added were over 100mb. While trying to submit them to Github, I got the following error;<\/p>\n<blockquote>\n<p class=\"fs-headline1 ow-break-word mb8 flex--item fl1\"><em><strong>&#8220;this exceeds GitHub&#8217;s file size limit of 100.00 MB&#8221;<\/strong><\/em><\/p>\n<\/blockquote>\n<p>After getting this error I saw it was Github File Storage. With this system, we can send files over 100mb to Github. For this, we need to install git-lfs in our local. For this, you can run the following command line from the terminal.<\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;swift&quot;,&quot;mime&quot;:&quot;text\/x-swift&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;lineNumbers&quot;:true,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:true,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">brew install git-lfs<\/pre>\n<\/div>\n<p>More information on git-lfs can be found <a href=\"https:\/\/docs.github.com\/en\/repositories\/working-with-files\/managing-large-files\/installing-git-large-file-storage\">here<\/a>.<\/p>\n<p>Then we need to come to the source code of our project and activate Large File Storage. For this, we need to specify which of our files will be included in this system. In my scenario several a files were high in size and I needed to upload them. That&#8217;s why I included all the files with the extension a in this system. After including it Github asks for user information. You must enter a username and password. When you enter your Github password, you will probably get an error like the one below.<\/p>\n<blockquote>\n<p class=\"p1\"><em><strong><span class=\"s1\">&#8216;remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.<\/span><\/strong><\/em><\/p>\n<\/blockquote>\n<p>This is because Github now requires personal access tokens. When you go to the settings page on Github, you must create a token in the Personal Access Token section of the Developer Settings section and enter this generated token in the password field in the terminal.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-2273\" src=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-26-at-11.33.02-1024x488.png\" alt=\"\" width=\"640\" height=\"305\" srcset=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-26-at-11.33.02-1024x488.png 1024w, https:\/\/sezeromer.com\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-26-at-11.33.02-300x143.png 300w, https:\/\/sezeromer.com\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-26-at-11.33.02-768x366.png 768w, https:\/\/sezeromer.com\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-26-at-11.33.02-1536x731.png 1536w, https:\/\/sezeromer.com\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-26-at-11.33.02-2048x975.png 2048w, https:\/\/sezeromer.com\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-26-at-11.33.02-500x238.png 500w, https:\/\/sezeromer.com\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-26-at-11.33.02-800x381.png 800w, https:\/\/sezeromer.com\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-26-at-11.33.02-1280x610.png 1280w, https:\/\/sezeromer.com\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-26-at-11.33.02-1920x914.png 1920w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-2271\" src=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-26-at-11.23.59-1024x112.png\" alt=\"\" width=\"640\" height=\"70\" srcset=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-26-at-11.23.59-1024x112.png 1024w, https:\/\/sezeromer.com\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-26-at-11.23.59-300x33.png 300w, https:\/\/sezeromer.com\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-26-at-11.23.59-768x84.png 768w, https:\/\/sezeromer.com\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-26-at-11.23.59-500x55.png 500w, https:\/\/sezeromer.com\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-26-at-11.23.59-800x88.png 800w, https:\/\/sezeromer.com\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-26-at-11.23.59.png 1152w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>After these operations, you can push your commit again. The problem will be solved.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2275\" src=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-26-at-14.14.20.png\" alt=\"\" width=\"893\" height=\"128\" srcset=\"https:\/\/sezeromer.com\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-26-at-14.14.20.png 893w, https:\/\/sezeromer.com\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-26-at-14.14.20-300x43.png 300w, https:\/\/sezeromer.com\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-26-at-14.14.20-768x110.png 768w, https:\/\/sezeromer.com\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-26-at-14.14.20-500x72.png 500w, https:\/\/sezeromer.com\/wp-content\/uploads\/2022\/02\/Screen-Shot-2022-02-26-at-14.14.20-800x115.png 800w\" sizes=\"(max-width: 893px) 100vw, 893px\" \/><\/p>\n<p>Again, if there is any problem, you can reach us by sending an e-mail or comment. You can find more articles <a href=\"https:\/\/sezeromer.com\/\">here<\/a>. Good work.<\/p>","protected":false},"excerpt":{"rendered":"<p>Hello friends, in this article, we will talk about the solution of a problem experienced while assigning the projects we created to Github. In the projects we develop, sometimes it is necessary to add the files with high size to the source code and submit them to Github. In cases where we do not throw, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1246,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[192,289,804,1,242,288,803,802,327,706,3],"tags":[887,886,888,881,885,197,295,883,884,882,470],"class_list":["post-2266","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-net-core","category-android","category-maui-android","category-c-ile-ilgili-yazilar","category-genel-en","category-ios","category-maui-ios","category-maui","category-swift","category-swiftui","category-xamarin-ile-yapilmis-projeler","tag-887","tag-100-mb","tag-888","tag-commit","tag-git","tag-github","tag-hata","tag-large-file-storage","tag-lfs","tag-push","tag-sourcetree"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/posts\/2266"}],"collection":[{"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/comments?post=2266"}],"version-history":[{"count":7,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/posts\/2266\/revisions"}],"predecessor-version":[{"id":2686,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/posts\/2266\/revisions\/2686"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/media\/1246"}],"wp:attachment":[{"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/media?parent=2266"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/categories?post=2266"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sezeromer.com\/en\/wp-json\/wp\/v2\/tags?post=2266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}