<?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: Filiz Senyuzluler</title>
    <description>The latest articles on DEV Community by Filiz Senyuzluler (@filizsenyuzluler).</description>
    <link>https://dev.to/filizsenyuzluler</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%2F342037%2Fe252df5c-33d1-4ab1-91a6-380a0c8df683.JPG</url>
      <title>DEV Community: Filiz Senyuzluler</title>
      <link>https://dev.to/filizsenyuzluler</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/filizsenyuzluler"/>
    <language>en</language>
    <item>
      <title>git — Rebase vs Merge</title>
      <dc:creator>Filiz Senyuzluler</dc:creator>
      <pubDate>Wed, 26 Feb 2020 07:43:28 +0000</pubDate>
      <link>https://dev.to/filizsenyuzluler/git-rebase-vs-merge-1ph0</link>
      <guid>https://dev.to/filizsenyuzluler/git-rebase-vs-merge-1ph0</guid>
      <description>&lt;p&gt;Rebasing and merging are both designed to integrate changes from one branch into another branch but in different ways.&lt;/p&gt;

&lt;p&gt;For ex. let’s say we have commits like below, the merge will result as a combination of commits, whereas rebase will add all the changes in feature branch starting from the last commit of the master branch:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NnRWGvOC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/uiw8r150eqr7q3gpkw4i.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NnRWGvOC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/uiw8r150eqr7q3gpkw4i.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;When you do rebase a feature branch onto master, you move the base of the feature branch to master branch’s ending point.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Merging takes the contents of the feature branch and integrates it with the master branch. As a result, only the master branch is changed. The feature branch history remains same.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Merging adds a new commit to your history.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Commits will look like :&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--a2XZaNX3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/q38tu0ww576x0bo8resn.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--a2XZaNX3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/q38tu0ww576x0bo8resn.JPG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to rebase? When to Merge?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If the feature branch you are getting changes from is shared with other developers, rebasing is not recommended, because the rebasing process will create inconsistent repositories. For individuals, rebasing makes a lot of sense.&lt;/p&gt;

&lt;p&gt;If you want to see the history completely same as it happened, you should use merge. &lt;strong&gt;Merge preserves history whereas rebase rewrites it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Rebasing is better to streamline a complex history, you are able to change the commit history by &lt;strong&gt;interactive rebase&lt;/strong&gt;. You can remove undesired commits, squash two or more commits into one or edit the commit message.&lt;/p&gt;

&lt;p&gt;Rebase will present conflicts one commit at a time whereas merge will present them all at once. It is better and much easier to handle the conflicts but you shouldn’t forget that reverting a rebase is much more difficult than reverting a merge if there are many conflicts. You can find details of a basic rebase process from &lt;a href="https://medium.com/@filissen/git-basic-rebase-1627b8296f04"&gt;git — Basic Rebase&lt;/a&gt; .&lt;/p&gt;

</description>
      <category>git</category>
      <category>rebase</category>
      <category>merge</category>
    </item>
  </channel>
</rss>
