<?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: Matt Miller</title>
    <description>The latest articles on Forem by Matt Miller (@megamattmiller).</description>
    <link>https://forem.com/megamattmiller</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%2F98437%2F1aaa9629-3a32-4842-a172-3166355135f4.png</url>
      <title>Forem: Matt Miller</title>
      <link>https://forem.com/megamattmiller</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/megamattmiller"/>
    <language>en</language>
    <item>
      <title>The Git Aliases That Get Me To Friday</title>
      <dc:creator>Matt Miller</dc:creator>
      <pubDate>Wed, 05 Sep 2018 14:38:11 +0000</pubDate>
      <link>https://forem.com/megamattmiller/the-git-aliases-that-get-me-to-friday-1cmj</link>
      <guid>https://forem.com/megamattmiller/the-git-aliases-that-get-me-to-friday-1cmj</guid>
      <description>&lt;h1&gt;
  
  
  The Git Aliases That Get Me To Friday
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--k_d3U9ss--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/j7to6mqn4b52h31fd9tf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--k_d3U9ss--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/j7to6mqn4b52h31fd9tf.png" alt="alt text" title="Git Logo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the last few years since switching from SVN to Git, I’ve picked up a few aliases that have helped me streamline my workflow and be all around more productive. After all, the whole point of shortcuts is to make your life easier right? I’d like to share my aliases with you, however unhelpful they may be.&lt;/p&gt;

&lt;h2&gt;
  
  
  Branching
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;co = checkout # Shortcut for checkout.
nb = checkout -b # Create a new branch and check it out.
bl = branch -l # List all local branches.
br = branch -r # List all remote branches.
blr = branch -a # Show local and remote branches.
bd = branch -d # Politely ask Git to delete a local branch.
bdf = branch -D # Sternly ask Git to delete a local branch.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Fetching/Syncing/Merging
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fp = fetch -p # Fetch and prune.
sync = !git pull &amp;amp;&amp;amp; git push # Pull then push current branch.
mm = !git fetch -p &amp;amp;&amp;amp; git merge origin/master #Merge remote master into the current branch.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Commits
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cm = commit # Shortcut for commit.
cma = commit -a # Commit all tracked.
cmam = commit -a -m # Commit all tracked with message to follow.
runAway = reset --hard # For when you just want it all to go away.
forgetAbout = rm --cached # Make Git forget about a tracked file.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Utilities
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;alias = config --get-regexp ^alias\\. # List all aliases.
ec = config --global -e # Open .gitconfig in your default editor.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I have all of these and maybe more by time you're reading this in a handy &lt;a href="https://github.com/MegaMattMiller/gitAliases"&gt;GitHub repo&lt;/a&gt; if you'd like to &lt;code&gt;[include]&lt;/code&gt; it in your Git config.&lt;/p&gt;

&lt;p&gt;I hope these aliases are as useful for you as they are for me.&lt;/p&gt;

&lt;p&gt;If you have your own favorite aliases, leave them in the comments below.&lt;/p&gt;

</description>
      <category>git</category>
      <category>alias</category>
      <category>productivity</category>
      <category>shell</category>
    </item>
  </channel>
</rss>
