<?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>DEV Community: Alex Nostadt</title>
    <description>The latest articles on DEV Community by Alex Nostadt (@amartinno1).</description>
    <link>https://dev.to/amartinno1</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%2F200716%2F385bbc63-f0ac-443a-b1a9-f073757b843d.jpeg</url>
      <title>DEV Community: Alex Nostadt</title>
      <link>https://dev.to/amartinno1</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/amartinno1"/>
    <language>en</language>
    <item>
      <title>How I speed up my daily developing in terminal context</title>
      <dc:creator>Alex Nostadt</dc:creator>
      <pubDate>Thu, 29 Aug 2019 21:29:49 +0000</pubDate>
      <link>https://dev.to/amartinno1/how-i-speed-up-my-daily-developing-in-terminal-context-58oj</link>
      <guid>https://dev.to/amartinno1/how-i-speed-up-my-daily-developing-in-terminal-context-58oj</guid>
      <description>&lt;p&gt;As lots of developer I don't want to waste time with typing more than necessary. So, I began to dig a little into bash and the possibilities and got a few alias's and scripts which helps me to speed up regularly tasks from booting up my virtual machine to updating my local git repository.&lt;/p&gt;

&lt;p&gt;It's available in a GitHub repository of mine: &lt;a href="https://github.com/AMartinNo1/terminal-helper"&gt;https://github.com/AMartinNo1/terminal-helper&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My most used alias's are:&lt;br&gt;
&lt;code&gt;alias vup="vagrant up'&lt;/code&gt;&lt;br&gt;
&lt;code&gt;alias vhalt="vagrant halt'&lt;/code&gt;&lt;br&gt;
&lt;code&gt;alias vssh='vagrant ssh'&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Thus the alias's don't save much typing it does feels much faster.&lt;/p&gt;

&lt;p&gt;Despite these I also wrote alias to quickly cd into projects. If I was working on dev.to it would be sth like:&lt;br&gt;
&lt;code&gt;alias devto='cd /path/to/repo/'&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Since mid of this week I added a little bash script which automatically updates my master and development branch and then goes back to my working Branch. As I work on a project with multiple people I can quickly update main branches and merge/rebase if necessary. Additional this ensures I always have up to date branches.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function gitBranchSimple() {
  git branch | grep "\*" | sed -e 's/* //g'
}

function gitUpdateLocalRepository() {
  currentBranch=$(gitBranchSimple)
  echo "Checking out master...";
  git checkout master
  echo "Pulling latest commits from remote master...";
  git pull
  echo "Checking out develop...";
  git checkout develop
  echo "Pulling latest commits from remote develop...";
  git pull
  echo "Switch back to original branch...";
  git checkout $currentBranch
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Having this in a repository allows an easy sync between devices as well.&lt;/p&gt;

&lt;p&gt;How do you speed up your developing?&lt;/p&gt;

</description>
      <category>bash</category>
      <category>terminal</category>
      <category>vagrant</category>
      <category>alias</category>
    </item>
  </channel>
</rss>
