<?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: renlstr.dev</title>
    <description>The latest articles on DEV Community by renlstr.dev (@renlstr_dev).</description>
    <link>https://dev.to/renlstr_dev</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%2F38639%2F77c66e9a-53c1-480e-825c-8f8b8b73c4a1.jpg</url>
      <title>DEV Community: renlstr.dev</title>
      <link>https://dev.to/renlstr_dev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/renlstr_dev"/>
    <language>en</language>
    <item>
      <title>Git Rebase Workflow to Github</title>
      <dc:creator>renlstr.dev</dc:creator>
      <pubDate>Thu, 04 Jan 2018 04:23:04 +0000</pubDate>
      <link>https://dev.to/renlstr_dev/git-rebasing-and-pushing-to-github-3c6c</link>
      <guid>https://dev.to/renlstr_dev/git-rebasing-and-pushing-to-github-3c6c</guid>
      <description>&lt;p&gt;I wish to share a useful git gist that I use on my workflow. I saw this on &lt;a href="https://gist.github.com/meagar/ae2c7f1b200d7fa52508" rel="noopener noreferrer"&gt;meagar's gist&lt;/a&gt; few years ago&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Rebase "feature/my_branch" onto master&lt;/strong&gt;
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;em&gt;if you work solo on the branch...&lt;/em&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ git checkout feature/my_branch # make sure you're on the right branch
$ git fetch # update remote refs
$ git rebase origin/master # perform the rebase from master
  # for each conflict, edit file, resolve conflicts, git add -u &amp;lt;file&amp;gt;, git rebase --continue
$ git push -f origin feature/my_branch # overwrite remote branch with newly rebased branch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;em&gt;if you work with someone else on a branch...&lt;/em&gt;
&lt;/h4&gt;

&lt;p&gt;Don't rebase!, The author who is working on the branch follows the steps above, then all other contributors do this...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ git checkout feature/my_branch # make sure you're on the right branch
$ git fetch # update remote refs
$ git reset --hard origin/feature/my_branch # discard the state of your branch, move to the newly rebased branch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Rebase "feature/my_branch" onto master, squashing all commits&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ git checkout feature/my_branch
$ git fetch
$ git reset --hard origin/master # move your branch to the current state of master
$ git merge --squash head@{1} # merge all changes from your branch into the index
$ git status # verify changes to be committed
$ git commit # edit all commit messages from previous commits down to a single sane commit message
$ git push -f feature/my_branch # overwrite remote branch with newly rebase branch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>git</category>
      <category>github</category>
    </item>
    <item>
      <title>Executing an SQL Query Directly from ActiveRecord</title>
      <dc:creator>renlstr.dev</dc:creator>
      <pubDate>Thu, 04 Jan 2018 04:19:36 +0000</pubDate>
      <link>https://dev.to/renlstr_dev/executing-an-sql-query-directly-from-activerecord-1i63</link>
      <guid>https://dev.to/renlstr_dev/executing-an-sql-query-directly-from-activerecord-1i63</guid>
      <description>&lt;p&gt;You can execute sql queries directly from ActiveRecord&lt;/p&gt;

&lt;h3&gt;
  
  
  #execute
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;users = ActiveRecord::Base.connection.execute("SELECT id, first_name, created_at FROM users WHERE id=1")

users[0]
{
  "id"         =&amp;gt; "1",
  "first_name" =&amp;gt; "Ren",
  "created_at" =&amp;gt; "2017-01-01 12:23:67.425118"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>rails</category>
      <category>ruby</category>
    </item>
  </channel>
</rss>
