<?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 Buddy Reno on Medium]]></title>
        <description><![CDATA[Stories by Buddy Reno on Medium]]></description>
        <link>https://medium.com/@BuddyLReno?source=rss-e3a49bd4a809------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*duiJ8e7NmVuUIkS0yKhsiA.jpeg</url>
            <title>Stories by Buddy Reno on Medium</title>
            <link>https://medium.com/@BuddyLReno?source=rss-e3a49bd4a809------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 05:50:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@BuddyLReno/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[Using Sass’ @at-root for Nesting Variants]]></title>
            <link>https://medium.com/buddy-reno/using-sass-at-root-for-nesting-variants-874735eb5766?source=rss-e3a49bd4a809------2</link>
            <guid isPermaLink="false">https://medium.com/p/874735eb5766</guid>
            <category><![CDATA[sass]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Buddy Reno]]></dc:creator>
            <pubDate>Mon, 11 Sep 2017 15:29:52 GMT</pubDate>
            <atom:updated>2017-09-11T15:29:52.337Z</atom:updated>
            <content:encoded><![CDATA[<p>Whenever I write styles for a js-interactive component, I typically add all my variant classes at the root level and use that to change all the child elements within the component.</p><pre>&lt;div class=&quot;Component is-active&quot;&gt;<br>  &lt;h2 class=&quot;title&quot;&gt;Some Title&lt;/h2&gt;<br>  &lt;!-- other elements --&gt;<br>&lt;/div&gt;</pre><pre>//css<br>.Component {<br>  display: flex;<br>  flex-direction: column;<br>}</pre><pre>.Component.is-active .title {<br>  color: blue;<br>  font-weight: 700;<br>}</pre><p>Using sass, this can become more difficult if you prefer to nest your styles within a namespace. Your first thought will likely be to simply add the class in front of the ampersand operator, but this won’t produce the right result.</p><pre>// Sass<br>.Component {<br>  .title {<br>    color: black;<br>    <br>    .is-active &amp; {<br>      color: blue;<br>    }<br>  }<br>}</pre><pre>// Css<br>.Component .title {<br>  color: black;<br>}</pre><pre>.is-active .Component .title {<br>  color: blue;<br>}</pre><p>If you try to remove the space between the variant class and the ampersand, Sass will give you a parsing error. You have to interpolate the selector for it to process.</p><pre>// Sass<br>.Component {<br>  .title {<br>    color: black;<br>    <br>    .is-active#{&amp;} {<br>      color: blue;<br>    }<br>  }<br>}</pre><p>Doing this grants you a new problem. The generated css is now a child of .Component .title.</p><pre>// Css<br>.Component .title {<br>  color: black;<br>}</pre><pre>.Component .title .is-active.Component .title {<br>  color: blue;<br>}<br>// Gross</pre><p>This is when @at-root comes into play. At-root will jump the selector out of it’s current nesting scope and start over, allowing you to apply the variant selector to the parent.</p><pre>// sass<br>.Component {<br>  .title {<br>    color: black;<br>    <br>    <a href="http://twitter.com/at">@at</a>-root .is-active#{&amp;} {<br>      color: blue;<br>    }<br>  }<br>}</pre><pre>// css<br>.Component .title {<br>  color: black;<br>}</pre><pre>.is-active.Component .title {<br>  color: blue;<br>}</pre><p>That’s better! You can make a mixin out of this pattern so you don’t need to reference this every time you need to use it.</p><pre><a href="http://twitter.com/mixin">@mixin</a> variant($selector) {<br>  <a href="http://twitter.com/at">@at</a>-root #{$selector}#{&amp;} {<br>    <a href="http://twitter.com/content">@content</a>;<br>  }<br>}</pre><pre>.Component {<br>  .title {<br>    color: black;<br>    <br>    <a href="http://twitter.com/include">@include</a> variant(&#39;.is-active&#39;) {<br>      color: blue;<br>    }<br>  }<br>}</pre><p>You could also use a naming convention like BEM that doesn’t make use of nesting quite as much. If that’s not your preference, @at-root can get you out of some of the pickles you may find yourself in when nesting deeply.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=874735eb5766" width="1" height="1" alt=""><hr><p><a href="https://medium.com/buddy-reno/using-sass-at-root-for-nesting-variants-874735eb5766">Using Sass’ @at-root for Nesting Variants</a> was originally published in <a href="https://medium.com/buddy-reno">Buddy Reno</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A simple thing the Ionic and Cordova docs don’t mention about the Android emulator.]]></title>
            <link>https://medium.com/buddy-reno/a-simple-thing-ionic-and-cordova-docs-dont-mention-about-the-android-emulator-da99aedf0af2?source=rss-e3a49bd4a809------2</link>
            <guid isPermaLink="false">https://medium.com/p/da99aedf0af2</guid>
            <category><![CDATA[ionic]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[android-emulator]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[cordova]]></category>
            <dc:creator><![CDATA[Buddy Reno]]></dc:creator>
            <pubDate>Thu, 13 Apr 2017 12:44:58 GMT</pubDate>
            <atom:updated>2017-04-13T12:49:53.227Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BSBDWM1zHlUpEgq_XgxERA.jpeg" /></figure><p>I began the week trying to spin up a test app with Ionic for my next project. My team is launching on Android first, which I’m unfamiliar with as far as development is concerned. I popped open the Ionic docs and got started. I got as far as needing to start up an emulator to accomplish my next task when I ran into a vague error that’s plagued me for the past 24 hours:</p><pre>$ ionic emulate android <br># or run $ cordova emulate android</pre><pre>.... building building</pre><pre>ERROR: Error: android: Command failed with exit code 2</pre><p>After hours of scouring the internet and the documentation, I finally discover the fix to my issue, hidden in an answer on a <a href="http://stackoverflow.com/questions/37612287/running-android-emulator-via-cordova-avd-manager-missing-from-android-studio">Stack Overflow</a> post. The question has nothing to do with my issue, nor does the phrase exit code 2 even appear on the post, so I’m still trying to figure out what trail I walked down to get there. So here’s the long and short:</p><p>If you can’t run the android emulator from ionic or cordova, it’s because <strong>you need to start the emulator first, then run the command</strong>.</p><p>That’s all I had to do. I couldn’t find anything stating that in the documentation for Ionic or Cordova, or it could be a flaw of my own understanding. Either way, if you made it here because you’re struggling with $ ionic emulate android or $ cordova emulate android, first of all, hi! Second of all, start your emulator and then run the emulate command.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da99aedf0af2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/buddy-reno/a-simple-thing-ionic-and-cordova-docs-dont-mention-about-the-android-emulator-da99aedf0af2">A simple thing the Ionic and Cordova docs don’t mention about the Android emulator.</a> was originally published in <a href="https://medium.com/buddy-reno">Buddy Reno</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bash Shortcuts to Enhance Your Git Workflow]]></title>
            <link>https://medium.com/buddy-reno/bash-shortcuts-to-enhance-your-git-workflow-74bf76e2bb0c?source=rss-e3a49bd4a809------2</link>
            <guid isPermaLink="false">https://medium.com/p/74bf76e2bb0c</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[bash]]></category>
            <dc:creator><![CDATA[Buddy Reno]]></dc:creator>
            <pubDate>Thu, 19 Jan 2017 17:02:09 GMT</pubDate>
            <atom:updated>2017-01-19T17:02:09.431Z</atom:updated>
            <content:encoded><![CDATA[<h4><a href="https://medium.freecodecamp.com/bash-shortcuts-to-enhance-your-git-workflow-5107d64ea0ff#.fy676l46v">full article 🔗</a></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5RNo772LhsWxTO5LYqbTYw.jpeg" /><figcaption>Unrelated — I just like it. <a href="https://unsplash.com/@peter_mc_greats">Photo credit</a></figcaption></figure><p>My team and I do some Git tasks very often and in specific sequences. I wanted to make it easier to accomplish my most common Git tasks, so I wrote a few bash scripts as Git aliases.</p><p><a href="https://medium.freecodecamp.com/bash-shortcuts-to-enhance-your-git-workflow-5107d64ea0ff#.fy676l46v"><em>Read the full article at Free Code Camp</em></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=74bf76e2bb0c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/buddy-reno/bash-shortcuts-to-enhance-your-git-workflow-74bf76e2bb0c">Bash Shortcuts to Enhance Your Git Workflow</a> was originally published in <a href="https://medium.com/buddy-reno">Buddy Reno</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Git Please: How To Force Push Without Being a Jerk]]></title>
            <link>https://medium.com/buddy-reno/git-please-how-to-force-push-without-being-a-jerk-93f368878a0e?source=rss-e3a49bd4a809------2</link>
            <guid isPermaLink="false">https://medium.com/p/93f368878a0e</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Buddy Reno]]></dc:creator>
            <pubDate>Thu, 19 Jan 2017 16:28:29 GMT</pubDate>
            <atom:updated>2017-01-19T17:03:36.839Z</atom:updated>
            <content:encoded><![CDATA[<h4><a href="https://medium.freecodecamp.com/git-please-a182f28efeb5#.452z9sofj">full article 🔗</a></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*PhSXjkYS9MTmoNwlPIdQpQ.jpeg" /><figcaption>Don’t be like Anakain.</figcaption></figure><p>As the size of a dev team grows, so does the likelihood of someone doing a force push and overwriting someone else’s code. Learn why using --force-with-lease is a better way to use a force push instead of --force.</p><p><a href="https://medium.freecodecamp.com/git-please-a182f28efeb5#.tjc8jx6g1"><em>Full article published at Free Code Camp</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93f368878a0e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/buddy-reno/git-please-how-to-force-push-without-being-a-jerk-93f368878a0e">Git Please: How To Force Push Without Being a Jerk</a> was originally published in <a href="https://medium.com/buddy-reno">Buddy Reno</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bash Shortcuts to Enhance Your Git Workflow]]></title>
            <link>https://medium.com/free-code-camp/bash-shortcuts-to-enhance-your-git-workflow-5107d64ea0ff?source=rss-e3a49bd4a809------2</link>
            <guid isPermaLink="false">https://medium.com/p/5107d64ea0ff</guid>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[bash]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Buddy Reno]]></dc:creator>
            <pubDate>Wed, 18 Jan 2017 22:15:54 GMT</pubDate>
            <atom:updated>2017-01-19T14:06:48.781Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5RNo772LhsWxTO5LYqbTYw.jpeg" /><figcaption>Unrelated — I just like it. <a href="https://unsplash.com/@peter_mc_greats">Photo credit</a></figcaption></figure><p>The more you work with Git, the faster you’ll learn its workflows.</p><p>Here are some of the tasks that me and my team do daily:</p><ol><li>Create and name branches</li><li>Count commits for squashing</li><li>Update master to the latest version, then rebase it onto a branch</li></ol><p>But each of these tasks requires multiple steps. This got me thinking: <em>there has to be a better way to do this</em>.</p><p>Thankfully, there is a better way! By learning a little Bash, you can to create Git aliases that will save you tons of time.</p><h4>First Things First: Git’s ! Flag</h4><p>Have you ever seen a Git alias that has an exclamation mark at the beginning? For example:</p><pre>somealias = “!......some code”</pre><p>According to the Git’s <a href="https://git-scm.com/docs/git-config#git-config-alias">documentation</a>, <em>If the alias expansion is prefixed with an exclamation point, it will be treated as a shell command.</em></p><p>Hey, that’s neat! We can use this to our advantage, and add some intelligence to our aliases. Let’s try a simple example first and build up the complexity further on.</p><p>Open up your ~/.gitconfig file in your favorite text editor and add the following alias:</p><pre>hello = &quot;!echo \&quot;Hello World\&quot;&quot;<br># (the backslashes are for escaping the quotes.)</pre><p>Now when you run $ git hello in your terminal, you’ll get Hello World as the output. Awesome! Armed with this knowledge, let’s walk through the 3 examples outlined above and the aliases I’ve used to accomplish them.</p><h4>Consistent Branch Names</h4><p>Alias:</p><pre>newb = &quot;!f() { ticketnum=$1; branchName=$2; git checkout -b \&quot;POD-${ticketnum}/${branchName}\&quot;; }; f&quot;</pre><p>Usage:</p><pre># Creates a new branch named POD-573/my-new-feature<br>$ git newb 573 my-new-feature</pre><p>Key Commands:</p><ul><li>Function: f(){}; f</li><li>Parameters: $1, $2</li><li>String Interpolation: ${ticketnum}, ${branchName}</li></ul><p>On my team, we prepend our branch names to match the card number in our ticketing system. For example: “POD-573/my-new-feature”. This works with a commit hook in the ticketing system to tie things together, so it’s important we stick with this system.</p><h4>Function</h4><p>In bash, you can write a function like this: FunctionName(){}; FunctionName. Writing the function name after the function declaration is what runs the function. In my aliases, I’ve shortened the function name to simply f for brevity.</p><p>When bash runs f, it will run all the code entered between the curly braces {}. In this case, the function is running git checkout -b “MESSAGE”.</p><h4>Parameters</h4><p>The parameters are what immediately follow the command. For example, the move command in bash:</p><pre>$ mv ./file.txt ./folder/file.txt</pre><p>The first parameter the move command receives is ./file.txt. This parameter is automatically assigned to $1 in bash.</p><p>Likewise, ./folder/file.txt is assigned to $2. In the alias function, you can use this knowledge to assign more meaningful variable names for those parameters.</p><pre># expanded for readability<br>!f() {<br><br> # much more meaningful!<br> ticketnum=$1; <br> branchName=$2;<br><br> git checkout -b \&quot;POD-${ticketnum}/${branchName}\&quot;;<br>};<br>f</pre><h4>String Interpolation</h4><p>To use variables in bash, you simply put a dollar sign $ in front of the variable name, like: $ticketnum. In this case, the function is interpolating the variable into a string.</p><p>While bash does allow users to interpolate by using the variable directly, I prefer to use the same syntax many other programming languages use to do string interpolation ${variable}.</p><p>Using the usage example above, When bash evaluates POD-${ticketnum}/${branchName}, it will expand to POD-573/my-new-feature.</p><h4>Commit Counting</h4><p>Alias:</p><pre>count = &quot;!f() { compareBranch=${1-master}; git rev-list --count HEAD ^$compareBranch; }; f&quot;</pre><p>Usage:</p><pre># Branch has made 5 commits since branching from master.<br>$ git count # returns 5<br><br># Pass in a branch name to check instead of master<br>$ git count dev</pre><p>Key Commands:</p><ul><li>Parameter Expansion: ${1-DEFAULT}</li><li>Counting Revisions: rev-list --count</li></ul><h4>Parameter Expansion</h4><p>Similar to the string interpolation, notice that the compareBranch variable is now being assigned using the ${} syntax. This allows you to set a default value if no parameter is passed through to the command. In the alias, compareBranch=${1-master} will use master as the compareBranch if nothing was passed to the command.</p><pre># assumes master<br>$ git count<br><br># compareBranch is set to dev<br>$ git count dev</pre><p>You can check out the bash <a href="http://www.gnu.org/software/bash/manual/bashref.html#Shell-Parameter-Expansion">documentation</a> for more on parameter expansion.</p><h4>Counting Revisions</h4><p>By default, Git’s rev-list command will return the SHAs associated with the given branch name. By using the --count flag, it will instead return the total number of commits for that particular branch. Since the goal is to get the number of <em>new</em> commits since branching from master (or some other branch), you need to pass in another branch name with the ^ operator.</p><pre>$ git rev-list --count HEAD ^master</pre><p>This command tells git <em>I want the number of commits that are accessible from HEAD (the current branch) but NOT ACCESSIBLE from master.</em></p><p>If you’ve made 5 commits after creating a branch from master, the command would return 5.</p><h4>Squashing X Commits</h4><p>Alias:</p><pre>squashbase = &quot;!f() { branchName=${1-master}; commitCount=$(git count $branchName); git rebase -i HEAD~$commitCount; }; f&quot;</pre><p>Usage:</p><pre># Get the number of commits to squash<br># and start an interactive rebase.<br>$ git squashbase<br><br># pass in an optional branch name.<br>$ git squashbase dev</pre><p>Key Command:</p><ul><li>Command Substitution: $(COMMAND)</li></ul><h4>Command Substitution</h4><p>This one is fun. The script again uses the optional branchName to substitute a branch for master, but the second parameter uses a new syntax $(). This is called “command substitution.” When Bash sees a command within the parenthesis, it will evaluate that statement and use the output as the value of the variable. For example x=$(echo “Hello”) will evaluate to x receiving the value of Hello.</p><p>In this case, the alias is calling back to the previous count alias to get the number of commits made since master. Assuming the current branch has made 5 commits since branching from master, running $ git squashbase will evaluate to $ git rebase -i HEAD~5. This command starts an interactive rebase with the latest 5 commits, giving you an opportunity to clean up your commits.</p><h4>Updating Master and Rebasing The Branch</h4><p>Alias:</p><pre>pullbase = &quot;!f() { branchName=${1-master}; git checkout $branchName &amp;&amp; git pull &amp;&amp; git checkout - &amp;&amp; git rebase -i $branchName; }; f&quot;</pre><p>Usage:</p><pre># Checkout the branch, pull it, check out the previous branch and rebase.<br>$ git pullbase<br><br>$ git pullbase dev</pre><p>Key Commands:</p><ul><li>Git’s dash shortcut: -</li><li>Control command: &amp;&amp;</li></ul><h4>Dash Shortcut</h4><p>There isn’t much to explain here. Basically, this will save you <em>a lot of typing</em>. The dash is a reference to the last branch you currently checked out — kind of like the recall button on a TV remote control.</p><p>Consider the following example:</p><pre># currently on branch dev<br>$ git checkout master # now on master branch<br><br>$ git checkout - # back on dev branch.<br><br>$ git checkout - # back on master branch.</pre><h4>Control Command</h4><p>There are many ways to chain operations together in bash. Using the double ampersand &amp;&amp; is one of my favorites.</p><p>The benefit of this command is that it will stop processing if the previous command failed to complete. If git checks out master but fails pulling down latest, it will stop instead of pressing forward and rebasing potentially stale changes into your branch.</p><p>The above alias will then execute the following steps, stopping if any fail:</p><ol><li>Checkout the master branch (or given branch).</li><li>Update to latest.</li><li>Checkout the branch you were previously on.</li><li>Interactive rebase the master branch into your current branch.</li></ol><p>My team requires all of our pull requests to be a single commit before they can be merged into master. So I run this command multiple times a day, and it’s saved me a lot of time since I started using it.</p><p>You can read about other control commands in Bash’s <a href="http://www.gnu.org/software/bash/manual/bashref.html#Lists-of-Commands">documentation</a>.</p><h3>Wait, why use an alias?</h3><p>You may be asking, “Shouldn’t I just be writing bash profile scripts?”</p><p>Technically, you could do that. The advantage here is <em>context</em>. All of these commands are comprised of various Git commands. A function in your bash profile will run anywhere you type it.</p><p>By creating these scripts as Git aliases, you ensure that the commands will only be run in a git repo. Plus you don’t have to prepend your function names with git-Function or gitFunction just to “namespace” them. If you were going to do that, a Git alias is a better fit.</p><p>I hope you’ve found some inspiration from my shortcuts, and learned how you can create some of your own.</p><p>If you’ve made some favorite aliases or other enhancements to your own git workflow, share them in the comments section so we can all explore them and potentially save ourselves lots of time and typing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5107d64ea0ff" width="1" height="1" alt=""><hr><p><a href="https://medium.com/free-code-camp/bash-shortcuts-to-enhance-your-git-workflow-5107d64ea0ff">Bash Shortcuts to Enhance Your Git Workflow</a> was originally published in <a href="https://medium.com/free-code-camp">We’ve moved to freeCodeCamp.org/news</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Git Please]]></title>
            <link>https://medium.com/free-code-camp/git-please-a182f28efeb5?source=rss-e3a49bd4a809------2</link>
            <guid isPermaLink="false">https://medium.com/p/a182f28efeb5</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Buddy Reno]]></dc:creator>
            <pubDate>Wed, 04 Jan 2017 17:33:15 GMT</pubDate>
            <atom:updated>2017-01-16T03:29:12.571Z</atom:updated>
            <content:encoded><![CDATA[<h3>Git Please: how to force push without being a jerk</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*PhSXjkYS9MTmoNwlPIdQpQ.jpeg" /><figcaption>Don’t be like Anakin.</figcaption></figure><p>As the size of a dev team grows, so does the likelihood of someone doing a force push and overwriting someone else’s code.</p><p>Here’s what a force push looks like in Git:</p><pre>$ git push --force origin master<br># `--force` can also  be written as `-f`</pre><p>This command can cause all kinds of problems. It basically tells Git that <em>I don’t care what is in origin/master. What I have is correct. Overwrite it.</em></p><p>So what happens if a co-worker had changes committed to a branch that you haven’t pulled down into your own repo? It gets overwritten, and your co-worker potentially has to re-do their work (or resurrect a commit or two if they still have it locally).</p><h3>Heather Miller on Twitter</h3><p>Carved something scary into pumpkin cc/ @jamesiry @databricks (office jackolantern)</p><p>But this whole mess can be easily avoided with a small change to how you use theforceflag. Instead of using —-force, Use --force-with-lease.</p><pre>$ git push --force-with-lease origin master</pre><p>To summarize Git’s <a href="https://git-scm.com/docs/git-push#git-push---force-with-leaseltrefnamegt">documentation</a>, using force-with-lease tells git to check whether the remote repo is the same as the one you’re trying to push up. If it isn’t, git will throw an error instead of blindly overwriting the remote repo. This will save you from accidentally overwriting work that you don’t intend to.</p><p>I hate typing force-with-lease though — especially because I’m used to typing the shorthand -f for force pushing. Thankfully, Git allows you to add aliases to make this quicker. I like to think that I’m asking Git if it’s okay to force push, so I’ve aliased push —force-with-lease to git please.</p><pre>$ git please origin master</pre><p>You can add an alias in git by typing this into your terminal:</p><pre>git config --global alias.please &#39;push --force-with-lease&#39;</pre><p>Or you can open up your ~/.gitconfig file and manually add the alias:</p><pre>[alias]<br>	co = checkout<br>	ci = commit<br>	please = push --force-with-lease</pre><h4>There’s always a caveat…</h4><p>It’s possible to trick force with lease however. When you use git pull to get updates from the origin, this is doing two commands at once. Git runs a fetch to pull down the reference to all the changes. Then it runs a merge to merge the changes you just fetched into your current branch.</p><p>If you only do a fetch to get the latest updates, you’ll only be updating your references — not actually merging the changes into your working copy. Then, if you force push with lease, Git will look at those references and think that the local copy is up to date with the remote, when in reality it isn’t yet. This will trick Git into overwriting the changes on the remote with your local copy, without having the changes actually merged in.</p><p>The easiest way to avoid this problem is always use git pull to fetch and merge at the same time. I’ve not run into any instances where I’ve needed to fetch and merge manually, so I can’t speak to those circumstances. Using pull has always worked for me.</p><p>I hope you find git please helpful and that, as a result, you never have to recover from a force-push nightmare.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a182f28efeb5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/free-code-camp/git-please-a182f28efeb5">Git Please</a> was originally published in <a href="https://medium.com/free-code-camp">We’ve moved to freeCodeCamp.org/news</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[365 Days of Backlog]]></title>
            <link>https://medium.com/buddy-reno/365-days-of-backlog-811ebfa7f7f?source=rss-e3a49bd4a809------2</link>
            <guid isPermaLink="false">https://medium.com/p/811ebfa7f7f</guid>
            <category><![CDATA[videogames]]></category>
            <category><![CDATA[new-years-resolutions]]></category>
            <category><![CDATA[2017]]></category>
            <category><![CDATA[gaming]]></category>
            <dc:creator><![CDATA[Buddy Reno]]></dc:creator>
            <pubDate>Mon, 02 Jan 2017 20:57:39 GMT</pubDate>
            <atom:updated>2017-01-03T18:22:09.828Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I4D3uesiTypHyzgusymzhQ.jpeg" /><figcaption>Playing <strong>Star Wars Battlefront</strong> over the holidays.</figcaption></figure><h4>A Year with No New Video Games</h4><p>I hate New Year’s resolutions. I don’t enjoy making them, and I <em>certainly</em> don’t enjoy sticking with them. As I booted up one of the many new games I picked up for myself with end of year Steam sales, I realized how much I keep obtaining and never actually playing. I bought <em>Way of The Samurai 4</em> which feels like a couple months ago was actually over a year ago. I played it exactly one time. There are many others I’ve received via bundles or other deals that haven’t been installed at all.</p><p>Between my friends and I with family library sharing and DRM free games, I have access to almost <em>800+ video games</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*Gqoturw2ZMQON5ib7P8ggQ.jpeg" /></figure><p>That’s a lot of games and not a lot of time, but I keep buying more. Almost all of these games I wanted to play at some point but there was always something newer that looked more enticing. I need to take a breather but I don’t have any incentive to stick to it besides sheer willpower.</p><p>While discussing my conundrum with my friend Dan, he informed me that he planned on doing the same thing this year. This brings up a good opportunity to create some incentive. We decided that in order for us to stick to the plan, we’d need to put some money on the line. If either of us buys a game for ourselves this year, we owe the other person a $20 Amazon gift card.</p><p>We’ll do this every time we break the resolution. I want to learn to be content with what I have, so I’m going to put my money where my mouth is. One of the big things I’d like to do this year, gaming-wise, is save up for a new video card. If I’m not buying new games left and right, this won’t be hard to accomplish. None of the above counts if a game is given as a gift, of course.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JqbL7Zcyqgl2ntHF8HS8OQ.jpeg" /><figcaption>Mmmmm… purdy.</figcaption></figure><p>Here’s a link to my <a href="http://steamcommunity.com/id/buddylreno">Steam account</a> which is a good portion of the games I’ll be playing this year, probably starting with <em>Far Cry Primal. </em>Cheers for the new year and happy gaming!</p><p><em>UPDATE: A few people have been a little confused about what I actually mean by “no new video games”. What I intend to mean is that I will not be buying any video games at all this year. I will only be playing what I already own or receive for free.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=811ebfa7f7f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/buddy-reno/365-days-of-backlog-811ebfa7f7f">365 Days of Backlog</a> was originally published in <a href="https://medium.com/buddy-reno">Buddy Reno</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Playdough time!]]></title>
            <link>https://medium.com/@BuddyLReno/playdough-time-e643a619b72?source=rss-e3a49bd4a809------2</link>
            <guid isPermaLink="false">https://medium.com/p/e643a619b72</guid>
            <category><![CDATA[instagram]]></category>
            <dc:creator><![CDATA[Buddy Reno]]></dc:creator>
            <pubDate>Thu, 29 Dec 2016 16:32:58 GMT</pubDate>
            <atom:updated>2016-12-29T18:28:45.691Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PDF110yZ4fz5jlrXxLZ4gg.jpeg" /></figure><p><em>Originally published on </em><a href="https://www.instagram.com/p/BOm56FRAEds/"><em>Instagram</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e643a619b72" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rogue One Gives The Rebellion The Depth It Needed]]></title>
            <link>https://medium.com/buddy-reno/rogue-one-gives-the-rebellion-the-depth-it-needed-bb30d9617e79?source=rss-e3a49bd4a809------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb30d9617e79</guid>
            <category><![CDATA[star-wars]]></category>
            <category><![CDATA[opinion]]></category>
            <category><![CDATA[rogue-one]]></category>
            <category><![CDATA[movies]]></category>
            <dc:creator><![CDATA[Buddy Reno]]></dc:creator>
            <pubDate>Mon, 26 Dec 2016 18:36:03 GMT</pubDate>
            <atom:updated>2016-12-26T18:36:03.881Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-y11QZBRT8C6AKLCmkjroA.jpeg" /></figure><p>After seeing <em>Rogue One</em> again last night, I’ve finally pinpointed what I enjoy about the movie so much. For the longest time, I’ve not really enjoyed the characters of the Rebel Alliance because I thought they were too “clean”. It felt like they did what was right because it was right, without any other motivation. <em>Star Wars</em> was good vs evil but that rings hollow with me. I want to see heroes with something to lose or nothing to lose. I find Superman boring until his mother or Lois Lane is in peril. It becomes personal and the decisions he makes change. <em>Rogue One</em> makes it personal for the Rebellion.</p><blockquote><em>Rogue One</em> highlights complex characters and I love it for that.</blockquote><p>The Rebellion is full of people who’ve lost homes, families, and friends. <em>Rogue One</em> highlights complex characters and I love it for that. It shows a side of the Rebellion and the war that we’ve not seen before. As Cassian says, they’ve been “spies, saboteurs, and assassins” for the cause. I love that this movie shows the fact that the Rebellion engages in the sort of espionage you would assume with a real war and those decisions are not made lightly.</p><p>These characters and plot lines add a depth to the Rebellion I felt it needed. I’ve always been a huge fan of the Empire because their stories always seemed so interesting. These last two <em>Star Wars </em>movies have given the Rebellion that same depth and intrigue.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb30d9617e79" width="1" height="1" alt=""><hr><p><a href="https://medium.com/buddy-reno/rogue-one-gives-the-rebellion-the-depth-it-needed-bb30d9617e79">Rogue One Gives The Rebellion The Depth It Needed</a> was originally published in <a href="https://medium.com/buddy-reno">Buddy Reno</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Silent Alarm]]></title>
            <link>https://medium.com/buddy-reno/the-silent-alarm-42c0f0a1bac8?source=rss-e3a49bd4a809------2</link>
            <guid isPermaLink="false">https://medium.com/p/42c0f0a1bac8</guid>
            <category><![CDATA[tech]]></category>
            <dc:creator><![CDATA[Buddy Reno]]></dc:creator>
            <pubDate>Wed, 05 Oct 2016 15:01:03 GMT</pubDate>
            <atom:updated>2016-12-20T19:08:45.656Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<h4>My charging strategy to use my Apple Watch 24/7.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ohb1dItH2hFXWToFMH8WTw.jpeg" /></figure><p>Last year at Christmas time, I took the plunge and bought an original Apple Watch. I liked it at first but since all the apps were quite slow, I became frustrated with it quickly. I enjoyed notifications on my wrist though, so I moved to a Pebble Time Steel within a few days of returning the Apple Watch. With it’s five to ten day battery, Pebble introduced me to the benefit of a silent alarm.</p><h4>Why Silent Alarms?</h4><p>I don’t know about you, but I’d rather be woken up by a moderate vibration on my wrist instead of a blaring alarm. I wake up much easier instead of with a jolt, plus I don’t have to pick between a bunch of alarm sounds I don’t enjoy. There’s also the side benefit of not waking my wife up each morning when I get up for work.</p><p>With the Series 2 and watchOS 3, I’ve been lured back to Apple’s walled garden, but I definitely wanted to keep using the silent alarm Pebble got me used to. My two main concerns were:</p><ol><li>When do I charge the watch?</li><li>How do I keep it from dying in the middle of the night?</li></ol><h4>Charging The Watch and Keeping It Alive</h4><p>The strategy that I follow is definitely not mine. I originally read about it earlier this year in a <a href="https://david-smith.org/blog/2015/09/21/how-to-wear-your-apple-watch-24-slash-7/">post by David Smith</a>, creator of the Sleep++ app. In it, he discusses how he charges his original Apple Watch.</p><ul><li>While getting ready for bed in the evening.</li><li>While getting ready for work in the morning.</li></ul><p>Then he puts the watch into airplane mode when he goes to sleep to save on battery during the night. When I tried this with my own original Apple Watch, I would wake up the next morning having lost only about 5% — 10% of battery. The time it takes to replace that charge in the morning is miniscule.</p><p>You’ll also want to make sure you charge your watch with the power brick it comes with, not the usb port on your computer. The watch will charge faster plugged into the wall. If you bought a Series 1 watch, just borrow your iPhone’s charger.</p><p>Since watchOS 3 has a few new helpful features that take a hit on your battery life, I’ve made a few additional adjustments to David Smith’s strategy.</p><h4>1. Turn off raise to wake.</h4><p>While you’re rolling around in your sleep, the watch will needlessly turn on wasting precious juice. Navigate to Settings on the watch, then General, then Wake Screen. You can turn off raise to wake there.</p><h4>2. Turn off or reduce background refresh.</h4><p>You can either turn this off completely when you go to bed (remember to turn it back on in the morning), or make sure you turn off refresh for any apps you don’t use regularly. Since the watch is in airplane mode,those apps will be needlessly spending energy. I subscribe to the latter method and leave the refresh on with 6 or 7 apps. The rest can wait a second or two when I need them.</p><h4>3. Use a reduced watch face.</h4><p>When you use a watch face with a complication, the complication has background refresh enabled for it regardless of your background refresh settings. I use a simpler watch face for sleeping due to this feature. I prefer using the X-Large face with the alarm complication, colored red. Red and black provides a nice contrast and doesn’t burden my eyes in the morning.</p><h3>Wishful Thinking</h3><p>Now that there’s a control center in watchOS 3, it would be nice if further updates added quick toggles for raise to wake and background refresh. With rumors going around about Apple creating an app for sleep tracking, we may get a setting that really locks down battery consumption making this a more viable reality for many.</p><p>Until then, we have to make due with a few work-arounds, which I believe, the benefits outweighs the annoyance.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=42c0f0a1bac8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/buddy-reno/the-silent-alarm-42c0f0a1bac8">The Silent Alarm</a> was originally published in <a href="https://medium.com/buddy-reno">Buddy Reno</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>