<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ilya Rokhkin on Medium]]></title>
        <description><![CDATA[Stories by Ilya Rokhkin on Medium]]></description>
        <link>https://medium.com/@rokhkin.ilya?source=rss-646da546e19a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bLBg88GyOQ2QzDbYMFouHQ.png</url>
            <title>Stories by Ilya Rokhkin on Medium</title>
            <link>https://medium.com/@rokhkin.ilya?source=rss-646da546e19a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 05:14:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rokhkin.ilya/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Working on a laptop with code in git repo very fast and securely]]></title>
            <link>https://medium.com/@rokhkin.ilya/working-on-laptop-with-code-in-git-repo-quickly-and-securely-790f8ddc1d69?source=rss-646da546e19a------2</link>
            <guid isPermaLink="false">https://medium.com/p/790f8ddc1d69</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[fast]]></category>
            <category><![CDATA[save]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[laptop]]></category>
            <dc:creator><![CDATA[Ilya Rokhkin]]></dc:creator>
            <pubDate>Fri, 23 Feb 2024 19:37:48 GMT</pubDate>
            <atom:updated>2024-03-17T19:04:35.943Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Git repo on RAM disk is fast" src="https://cdn-images-1.medium.com/max/1024/1*GCim4Nezy7aZA0NW_MZWog.png" /></figure><p>How to make the work on the laptop with git repo very quick, and secured<br>Related to code that is private and must be safe even if the laptop is stolen and the disk is decrypted</p><p>This is how I use it:</p><p>It is my MAC example, the same can be done in Windows and Linux laptops:</p><p>## I created RAMdisk, I mount RAM as mount point,<br>I clone git repositories on the RAM disk mount</p><p>alias RAMDisk=&quot;diskutil apfs create $(hdiutil attach -nomount ram://131072000) RAMDisk &amp;&amp; touch /Volumes/RAMDisk/.metadata_never_index&quot;</p><p>## This is my RAM disk in memory</p><p>$ df /Volumes/RAMDisk<br>Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on<br>/dev/disk11s1 131072000 253208 130582920 1% 5227 652914600 0% /Volumes/RAMDisk</p><p>## So when I clone repo to it, I can work with git repo sources very fast, as it is RAM<br>## Compared to SSD disk is even, 10 times faster<br>## All works fast, all git commands as related to FS operations<br>## Code compilations are very fast, the same 10 times faster than SSD</p><p>$ pwd</p><p>/Volumes/RAMDisk/git_best_pracices_ppt</p><p>$ git status</p><p>On branch feat/DEVOPS-123-policy-service-migrate</p><p>Your branch is up to date with &#39;origin/feat/DEVOPS-123-policy-service-migrate&#39;.</p><p>## Now when the laptop is restarted, or the hard disk is extracted and decrypted</p><p>## No git repo will be found on disk, so the company security is saved</p><p>## How do I save my work on RAMDisk in case there is a restart of the laptop?</p><p>## Well, I commit and push my feature branch every save I did</p><p>## This way I follow git best practices to commit as frequently as I can, every save!</p><p>## I can always find what I changed in commits</p><p>## And all my work is backed up in a remote repository in my feature branch, so nothing ever is lost, all is saved</p><p>## Here is an example for VS code I use, I use the plugin &quot;Run on Save&quot;, see here how to use it:</p><p><a href="https://github.com/ilyaro/git_best_practices_ppt/blob/master/VSCode/CommitOnSave_VisualStudioCode.md">https://github.com/ilyaro/git_best_practices_ppt/blob/master/VSCode/CommitOnSave_VisualStudioCode.md</a></p><p>## When I need to open MR, or PR for code review, I can push only relevant commits or 1 commit</p><p>$ git reset --soft origin/master</p><p>$ git commit -m &quot;My awsome feature done&quot;</p><p>## See all the changes before pushing them</p><p>$ git log -p</p><p>## Fetch master commits</p><p>$ git fetch origin</p><p>## Rebase on origin/master</p><p>$ git rebase origin/master</p><p>## Push my 1 rebased commit for review</p><p>$ git push —force-with-lease origin</p><p>So to summarize:</p><p>Advantages of the quick and secure work with git:</p><ul><li>All the git command and code compilation commands are very fast</li><li>All my work is saved in commits per save so it is very easy to find any change I did nothing is lost</li><li>All my saved work/commits are pushed to my feature branch to the remote repo, so it is saved and backed up, I can access my branch from any computer</li><li>The code of my company is saved and secured, nothing is kept on disk, so after reboot or the disk extraction there will be no code there</li></ul><p>Disadvantages:</p><ul><li>Need to clone repositories every time after reboot</li><li>When working disconnected from the network, the work is saved on RAM, so need to push all when connected to the network, otherwise, it can be lost after restart</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=790f8ddc1d69" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>