<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Ivan Shcheklein</title>
    <description>The latest articles on Forem by Ivan Shcheklein (@shcheklein).</description>
    <link>https://forem.com/shcheklein</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F162162%2Fde755aac-afdd-486e-95e9-1a63751b8dfa.jpg</url>
      <title>Forem: Ivan Shcheklein</title>
      <link>https://forem.com/shcheklein</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/shcheklein"/>
    <language>en</language>
    <item>
      <title>🤖 Learning GitHub Actions: Creating Beautiful PR Comments</title>
      <dc:creator>Ivan Shcheklein</dc:creator>
      <pubDate>Tue, 11 Aug 2020 02:14:18 +0000</pubDate>
      <link>https://forem.com/shcheklein/learning-github-actions-creating-beautiful-pr-comments-ibk</link>
      <guid>https://forem.com/shcheklein/learning-github-actions-creating-beautiful-pr-comments-ibk</guid>
      <description>&lt;p&gt;You've probably seen the services that automatically generate &lt;strong&gt;GitHub &lt;a href="https://guides.github.com/activities/hello-world/#pr"&gt;PR&lt;/a&gt; comments with tables, images, links&lt;/strong&gt;? Something like these two:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;a href="https://dev-to-uploads.s3.amazonaws.com/i/a8hyqrhycqdxt6y9rjgy.png"&gt;🔎 Codecov report&lt;/a&gt;&lt;/th&gt;
&lt;th&gt;&lt;a href="https://dev-to-uploads.s3.amazonaws.com/i/ft842twc81t7tevz735s.png"&gt;🔎 Calibre report&lt;/a&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Q5DOwWej--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/a8hyqrhycqdxt6y9rjgy.png" alt="Codecov Github Comment"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--I8ngvWy7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ft842twc81t7tevz735s.png" alt="Web Perfomance Comment"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;a href="https://codecov.io/"&gt;Codecov&lt;/a&gt; and &lt;a href="%20https://calibreapp.com/"&gt;Calibre&lt;/a&gt; reports



&lt;p&gt;Magic, right ✨? Let's see how it can be done. We won't even need to use command line or offline editors this time!. This post covers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How to create a "Hello world!" GitHub action online&lt;/li&gt;
&lt;li&gt;Use &lt;a href="https://cml.dev"&gt;CML&lt;/a&gt; scripts to generate comments with a custom Markdown that includes a picture 🖼.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Read more about &lt;a href="https://github.com/iterative/cml"&gt;CML&lt;/a&gt;. Besides GitHub comments, it can do the same for GitLab. Also, it's important that it was built with Machine Learning workflow in mind and automates a lot of tedious tasks in ML.&lt;/em&gt; besides simple reports.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h1&gt;
  
  
  Step 1: Create Action File
&lt;/h1&gt;

&lt;p&gt;You can do this using GitHub online UI! &lt;strong&gt;Add the file &lt;code&gt;.github/workflows/cml.yaml&lt;/code&gt; to your repo&lt;/strong&gt; like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Btw, I've forked the &lt;a href="https://github.com/iterative/example-get-started"&gt;DVC example get started&lt;/a&gt; repo to play with actions in this tutorial - feel free to do the same&lt;/em&gt; 😊&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IpmcB45C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ahsucwz0nt1kmo7bb22x.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IpmcB45C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ahsucwz0nt1kmo7bb22x.gif" alt="Create GitHub Action"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  Step 2: Add "Hello world!" Action
&lt;/h1&gt;

&lt;p&gt;Feel free to copy-paste it from this &lt;a href="https://gist.github.com/shcheklein/95592fd64b181332214d259c081486e3#file-cml-yaml"&gt;gist&lt;/a&gt;: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZflFJaXc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qklinbnxwd0t5nulfb5x.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZflFJaXc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qklinbnxwd0t5nulfb5x.gif" alt="Hello World Action"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  Step 3: Add Images 🖼️
&lt;/h1&gt;

&lt;p&gt;That's where the the magic ✨ happens! Let's update a few lines of code like this (copy-paste from this &lt;a href="https://gist.github.com/shcheklein/774eeed7280a1bcc86d52cd2d680de72"&gt;gist&lt;/a&gt;): &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KlUQ7h_Q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9reewdur4tmzbc9843hc.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KlUQ7h_Q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9reewdur4tmzbc9843hc.gif" alt="Magic"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;cml-publish prc.svg --md &amp;gt;&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; report.md
&lt;span class="go"&gt;cml-send-comment report.md
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;That's pretty all you need if you use the &lt;a href="//cml.dev"&gt;CML&lt;/a&gt; docker to run the action! &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;We specifically don't focus on the other three lines of the action, those that generate the image. It's out of scope of this post and it's specific to the repository. We definitely recommend reading it and &lt;a href="https://dvc.org"&gt;DVC&lt;/a&gt; docs if you are machine learning practitioner.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;cml-publish&lt;/code&gt;&lt;/strong&gt; - saves an image and creates an &lt;code&gt;![Image](link)&lt;/code&gt; entry in the Markdown file &lt;code&gt;report.md&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;cml-send-comment&lt;/code&gt;&lt;/strong&gt; - sends the comment to GitHub to get the result 👇&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 4: Profit 💥
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5XrxssnY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/c3ydclp12l6yupf0lruv.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5XrxssnY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/c3ydclp12l6yupf0lruv.gif" alt="Profit"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The result looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HOUp0kdE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3p50ao7ptl43oql4trmz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HOUp0kdE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3p50ao7ptl43oql4trmz.png" alt="Result"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this case it includes a &lt;a href="https://scikit-learn.org/stable/auto_examples/model_selection/plot_precision_recall.html#plot-the-precision-recall-curve"&gt;precision-recall curve&lt;/a&gt; which is a fundamental and useful characteristic for a binary classifier. &lt;strong&gt;But you can include any images, any text using Markdown markup to create your own unique and useful report!&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;That's it for today 👌 &lt;/p&gt;

&lt;p&gt;We've just barely scratched the surface of the GitHub actions and CML capabilities! We definitely recommend taking a look at the actions &lt;a href="https://github.com/marketplace"&gt;marketplace&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;And of course, read more about &lt;a href="https://github.com/iterative/cml"&gt;CML&lt;/a&gt;. Besides GitHub comments, it can do the same for GitLab. It was built with Machine Learning workflow in mind and automates a lot of tedious tasks in ML - like running training remotely.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>github</category>
      <category>productivity</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>✨ Shtab: Provide Autocomplete for your Python App</title>
      <dc:creator>Ivan Shcheklein</dc:creator>
      <pubDate>Tue, 28 Jul 2020 01:23:44 +0000</pubDate>
      <link>https://forem.com/shcheklein/shtab-provide-autocomplete-for-your-python-app-3npd</link>
      <guid>https://forem.com/shcheklein/shtab-provide-autocomplete-for-your-python-app-3npd</guid>
      <description>&lt;p&gt;I believe most folks have written a bash or Python app/tool that runs from the terminal command line to do &lt;code&gt;some useful stuff&lt;/code&gt;. These programs usually accept some parameters and options. And it's really cool when you can press the &lt;code&gt;TAB&lt;/code&gt; key and get the list of options the command expects:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;git ch&amp;lt;TAB&amp;gt;
&lt;span class="c"&gt;...
&lt;/span&gt;&lt;span class="go"&gt;checkout         -- checkout branch or paths to working tree
checkout-index   -- copy files from index to working directory
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;🦾 It seems to be a minor thing but it boosts your productivity significantly! Enough for a search query &lt;code&gt;productivity terminal autocomplete&lt;/code&gt; to generate almost a million results.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  So, how can you do the same magic for your Python app?
&lt;/h3&gt;

&lt;p&gt;The simplest answer is &lt;a href="https://github.com/iterative/shtab"&gt;Shtab&lt;/a&gt; - a Python library that can analyze your code and generate necessary files for &lt;code&gt;bash&lt;/code&gt; or &lt;code&gt;zsh&lt;/code&gt; shell to give your tools the same powerful functionality💥 .&lt;/p&gt;

&lt;p&gt;This tool was created by &lt;a href="https://github.com/casperdcl"&gt;Casper&lt;/a&gt; to automate the maintenance of the &lt;a href="https://dvc.org"&gt;DVC&lt;/a&gt; project:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;😱 &lt;em&gt;Every time a new feature is added, maintainers and contributors have to update tab completion scripts for multiple supported shells. At best, it's a pain, and at worst, error-prone.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Okay, enough talk, let's see it in action 🎥.
&lt;/h3&gt;

&lt;p&gt;For Python CLI application using &lt;code&gt;argparse&lt;/code&gt;, &lt;code&gt;docopt&lt;/code&gt;, or &lt;code&gt;argopt&lt;/code&gt; simply hand your parser object to &lt;code&gt;shtab&lt;/code&gt; (either via the CLI or the Python API), and a tab completion script will be generated for your preferred shell. It's as easy as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;shtab &lt;span class="nt"&gt;--shell&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;bash myprogram.main.parser
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;or in Python:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;shtab&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;shtab&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;complete&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;parser&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;shell&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"bash"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;That's how &lt;a href="https://dvc.org/doc/install/completion"&gt;Git for Data's&lt;/a&gt; in terminal looks like when completion is installed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;% dvc &amp;lt;TAB&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="go"&gt;Completing dvc commands
add         -- Track data files or directories with DVC.
cache       -- Manage cache settings.
checkout    -- Checkout data files from cache.
commit      -- Save changed data to cache and update DVC-files.
completion  -- Prints out shell tab completion scripts.
At Top: Hit TAB for more, or the character to insert
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;






&lt;p&gt;I hope you'll find it useful and this lib will save you some time! As usual, give the project a ⭐️ to thank the &lt;a href="https://github.com/casperdcl"&gt;author&lt;/a&gt; and welcome to the issue tracker or comments 👇 if you have any questions.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>python</category>
      <category>productivity</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to version large files with Git</title>
      <dc:creator>Ivan Shcheklein</dc:creator>
      <pubDate>Sun, 19 Jul 2020 15:49:40 +0000</pubDate>
      <link>https://forem.com/shcheklein/how-to-version-large-files-with-git-2ij1</link>
      <guid>https://forem.com/shcheklein/how-to-version-large-files-with-git-2ij1</guid>
      <description>&lt;p&gt;It's not a secret, Git doesn't handle large files well:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Indeed. The git architecture simply sucks for big objects. It was discussed somewhat during the early stages, but a lot of it really is pretty fundamental.&lt;/strong&gt; (&lt;em&gt;&lt;a href="http://www.gelato.unsw.edu.au/archives/git/0602/16129.html"&gt;Linus Torvalds&lt;/a&gt;&lt;/em&gt;)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this short post I'd like to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;See what tools are available there to handle large files with Git&lt;/li&gt;
&lt;li&gt;Try one of those - &lt;a href="https://dvc.org"&gt;DVC&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Have you ever committed a few 100 MBs file to then realize it's part of the repo now and it would &lt;a href="https://stackoverflow.com/questions/2100907/how-to-remove-delete-a-large-file-from-commit-history-in-git-repository"&gt;take quite an effort to carve it out&lt;/a&gt; and fix the repo:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_ctuIhgW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/m38ll2r8wlg0o0uoquh9.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_ctuIhgW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/m38ll2r8wlg0o0uoquh9.jpg" alt="Large file in Git"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Git clone takes hours, regular operations might take minutes instead of seconds - not the best idea indeed. &lt;strong&gt;And still, there are a lot of cases where we want to have a large file versioned in our repo - from game development to data science where we want to handle large datasets, videos, etc.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So, let's see what open-source and Git-compatible options do we have to deal with this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://git-lfs.github.com/"&gt;Git-LFS&lt;/a&gt; - Github and Gitlab both support it and can store large files on their servers for you, with some &lt;a href="https://github.blog/changelog/2020-02-12-increased-git-large-file-storage-limits"&gt;limits&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://git-annex.branchable.com/"&gt;Git-annex&lt;/a&gt; - pretty powerful and sophisticated tool, but it makes it hard to learn and manage to my mind&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://dvc.org/"&gt;DVC&lt;/a&gt; - &lt;a href="https://dvc.org/"&gt;Git for Data&lt;/a&gt; or Data Version Control - a tool made for ML and data projects, but on its fundamental level helps versioning large files&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;You can read (a somewhat outdated) overview of LFS and annex tools &lt;a href="https://lwn.net/Articles/774125/"&gt;here&lt;/a&gt;, but this time I want to show you how the workflow looks like with DVC (yes! I'm one of the maintainers).&lt;/p&gt;

&lt;p&gt;After DVC is &lt;a href="https://dvc.org/doc/install"&gt;installed&lt;/a&gt; all we need to do is to run &lt;code&gt;dvc add&lt;/code&gt; and set a storage you'd like to use to store your large files. &lt;/p&gt;

&lt;p&gt;Let's try it right here and there, first we need a dummy repo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;example
&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;example
&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;git init
&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dvc init
&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"initialize"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Second, generate a large file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-c1000000&lt;/span&gt; /dev/urandom &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; large-file 
&lt;span class="gp"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Windows: fsutil file large-file test.txt 1048576
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The workflow is similar to Git, but instead of &lt;code&gt;git add&lt;/code&gt; and &lt;code&gt;git push&lt;/code&gt; we run &lt;code&gt;dvc add&lt;/code&gt; and &lt;code&gt;dvc push&lt;/code&gt; when we want to save a large file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dvc add large-file
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now, let's save it somewhere (we use Google Drive here, but it can be AWS S3, Google Cloud, local directory, and many other &lt;a href="https://dvc.org/doc/command-reference/remote/add#supported-storage-types"&gt;storage options&lt;/a&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dvc remote add &lt;span class="nt"&gt;-d&lt;/span&gt; mystorage gdrive://root/Storage
&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;dvc push
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;You'd need to create the &lt;code&gt;Storage&lt;/code&gt; directory in your &lt;a href="https://drive.google.com/"&gt;Google Drive UI&lt;/a&gt; first and &lt;code&gt;dvc push&lt;/code&gt; will ask you to give it access to your storage. It is absolutely safe! - &lt;strong&gt;credentials are saved on your local machine in the &lt;code&gt;.dvc/tmp/gdrive-user-credentials.json&lt;/code&gt;, no access given outside.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now, we can do &lt;code&gt;git commit&lt;/code&gt; to save DVC files instead of a large file itself (you can run &lt;code&gt;dvc status&lt;/code&gt; to see that &lt;code&gt;large-file&lt;/code&gt; is not handled and visible by Git anymore):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;git add &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;git status
&lt;span class="go"&gt;
On branch master
Changes to be committed:
&lt;/span&gt;&lt;span class="gp"&gt;  (use "git restore --staged &amp;lt;file&amp;gt;&lt;/span&gt;...&lt;span class="s2"&gt;" to unstage)
&lt;/span&gt;&lt;span class="go"&gt;    modified:   .dvc/config
    new file:   .gitignore
    new file:   large-file.dvc

&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;git commit &lt;span class="nt"&gt;-a&lt;/span&gt; &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"add large file"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;






&lt;p&gt;That's it for today, next time we'll see how did it work, what does &lt;code&gt;large-file.dvc&lt;/code&gt; mean, why does it create &lt;code&gt;.gitignore&lt;/code&gt; and how can we get our file back! &lt;/p&gt;

</description>
      <category>git</category>
      <category>howto</category>
      <category>github</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
