<?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 cereblanco on Medium]]></title>
        <description><![CDATA[Stories by cereblanco on Medium]]></description>
        <link>https://medium.com/@cereblanco?source=rss-c90969af998c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*-GHxQC8hVoNQQlj1.jpg</url>
            <title>Stories by cereblanco on Medium</title>
            <link>https://medium.com/@cereblanco?source=rss-c90969af998c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 16 Apr 2026 13:55:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@cereblanco/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[Daily Git Commands]]></title>
            <link>https://cereblanco.medium.com/daily-git-commands-310966e73bef?source=rss-c90969af998c------2</link>
            <guid isPermaLink="false">https://medium.com/p/310966e73bef</guid>
            <category><![CDATA[git-cli]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[git-commands]]></category>
            <dc:creator><![CDATA[cereblanco]]></dc:creator>
            <pubDate>Sun, 29 Dec 2019 05:21:00 GMT</pubDate>
            <atom:updated>2023-05-10T08:12:16.379Z</atom:updated>
            <content:encoded><![CDATA[<p>Sequence of Git commands I use when implementing a new feature a.k.a my mostly used git commands</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*O-gVzOiibuiDmT7V39sGUw.png" /></figure><ol><li><strong>git checkout master</strong> — I make sure I work on top of the <em>master</em> branch</li><li><strong>git pull origin master</strong> —I make sure that my repository is updated with the latest version</li><li><strong>git checkout -B &lt;feature/A&gt;</strong> — Checkout a new branch for the feature</li><li><strong>git stash </strong>— I want to save my rough draft and get back to it later, but it’s not ready for a commit just yet</li><li><strong>git stash apply </strong>— Apply my rough draft <strong>#4</strong>, I want to continue working on it</li></ol><blockquote><strong><em>4 &amp; 5 </em></strong><em>don’t always happen, but I do it especially if want to checkout and review other branches</em></blockquote><p>6. <strong>git add . </strong>— My changes look good, I want to commit them</p><p>7. <strong>git commit -m “Add this feature” </strong>— Commit changes and add a clear description</p><p>8. <strong>git push origin HEAD </strong>— Push this branch to remote repository</p><blockquote><strong>The above scenario is the simplest. But most of the time it’s more complicated and looks like this</strong></blockquote><p>6. git add . &amp;&amp; git commit -m “Update implementation”</p><p>7. git add . &amp;&amp; git commit -m “Add a small fix”</p><p>8. git add . &amp;&amp; git commit -m “Add another fix”</p><blockquote><strong>As seen, I committed some little changes, but it made my commit history kinda “dirty”. So, I cleanup my commit history by rebasing interactively.</strong></blockquote><p>9. <strong>git rebase -i HEAD~(n) </strong>— Cleanup commits and messages, where <strong>n</strong> is the number of commits I wanted to edit starting from HEAD</p><blockquote>In this case (git rebase -i HEAD~4). Then, I either <strong>pick, fixup, reword, or drop </strong>some commits</blockquote><ul><li>pick -&gt; use commit</li><li>fixup (f) -&gt; squash, by discard the commit’s log message</li><li>drop (d) -&gt; remove commit</li><li>reword (r) -&gt; edit commit messsage</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C-dLxRPWCe_BRLoz8m8IAA.png" /><figcaption>Git Rebase Interactively</figcaption></figure><blockquote>After rebasing, all that is left is the commit I picked, in this case commit “Add feature A”. Fixed-up (f) commits will be squashed to the previous commit, and dropped (d) commits will be removed.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*eK-JA_Sd5DgNj0eQZZZUTw.png" /></figure><p>10. <strong>git push origin HEAD -f </strong>— Force push the changes especially since we’re rebasing. Caveat ⚠️ it will overwrite your remote branch</p><p>That’s it! The branch is ready for <em>Pull Request. </em>✨</p><p><strong>Note: </strong>branch <em>feature/A</em> is not necessary a feature but more of a small Pull Request (PR). I like small PRs, I usually chop down a big feature into small PRs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=310966e73bef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setup Black and Isort in VSCode]]></title>
            <link>https://cereblanco.medium.com/setup-black-and-isort-in-vscode-514804590bf9?source=rss-c90969af998c------2</link>
            <guid isPermaLink="false">https://medium.com/p/514804590bf9</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[vscode-extension]]></category>
            <category><![CDATA[vscode]]></category>
            <dc:creator><![CDATA[cereblanco]]></dc:creator>
            <pubDate>Fri, 08 Nov 2019 13:41:14 GMT</pubDate>
            <atom:updated>2021-06-18T01:31:08.413Z</atom:updated>
            <content:encoded><![CDATA[<p>Assuming you have installed VSCode and Python interpreter on your machine, here are the steps in setting up Black and Isort in VSCode:</p><p><strong>1. Install </strong><a href="https://marketplace.visualstudio.com/items?itemName=ms-python.python"><strong>Python Extension</strong></a></p><p>In Mac, use <strong>command + shift + x</strong> to open Marketplace. Search for <a href="https://marketplace.visualstudio.com/items?itemName=ms-python.python">Python Extension</a>, and install it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*-1u_C50gca6RLsRpvdgUxg.png" /></figure><p><strong>2. Install Black, and Isort</strong></p><p>Note: <em>You can create and use a new virtual environment or install it globally. In this setup, my python environment is at </em><strong>./workspace_venv/bin/python3</strong></p><pre>$ pip3 install black</pre><pre>$ pip3 install isort</pre><p>3. Edit <strong>settings</strong> and configure Black and Isort. <strong>command + shift + p</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BKaAQjSLs6Tp5aL36EHmPw.png" /></figure><p>User <em>settings</em> editor will pop-up and you should configure it with something like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/81c57628c574eb5483c31326049ff207/href">https://medium.com/media/81c57628c574eb5483c31326049ff207/href</a></iframe><p><strong>editor.formatOnSave: true </strong>formats document on save</p><ul><li><strong><em>python.pythonPath </em></strong>points to the virtual environment where Black and Isort are installed</li><li><strong>python.formatting.blackArgs: [“ — line-length=99”] </strong>configures <em>line-length</em> for Black.</li></ul><p>NOTE: I personally set line-length/line_length to 99. Black’s line-length default value is 88. I-sort’s default line_length is 79.</p><ul><li><strong>python.sortImports.args: [“ — profile”, “black”] </strong>Starting Isort 5.0, we we can easily configure Isort to match Black’s settings by passing args<br>&quot;--profile&quot;, &quot;black&quot;</li><li><strong>source.organizeImports: true </strong>runs Isort automatically upon saving your document</li><li><strong>Edit (25th April 2021):<br>Update:<br></strong>You can configure Black and Isort’s settings on <strong>pyproject.toml. <br></strong>Inside your root’s project folder, create or update your <strong>pyproject.toml</strong> file to include</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e715583e77e88413c485bf2b6678f501/href">https://medium.com/media/e715583e77e88413c485bf2b6678f501/href</a></iframe><p>There! You can now enjoy a formatted code upon saving your document. ✨</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=514804590bf9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>