{"data":{"site":{"siteMetadata":{"title":"FrontCode Blog","author":"Robert Kisiel"}},"markdownRemark":{"id":"2993d065-ab3f-5338-993d-ac821589e5e0","excerpt":"So I’m one of those developers who prefer rebasing instead of merging to keep a nice linear commit history. Whenever I got rejected on pushing a branch to…","html":"<p>So I’m one of those developers who prefer rebasing instead of merging to keep a nice linear commit history.</p>\n<p>Whenever I got rejected on pushing a branch to remote (e.g. because someone meanwhile introduced new changes) I have been using first <code class=\"language-text\">git fetch</code> followed by <code class=\"language-text\">git rebase origin/the-branch</code> to put my changes on top of everything. Recently I discovered that there is an easier way, it’s: <code class=\"language-text\">git pull --rebase</code>.</p>\n<p>In short it does exactly what is done with the two mentioned. So instead of:</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token function\">git</span> fetch\n<span class=\"token function\">git</span> rebase origin/the-branch</code></pre></div>\n<p>I’m using:</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">git pull --rebase</code></pre></div>","frontmatter":{"title":"git pull --rebase - Today I learned","date":"February 25, 2019"}}},"pageContext":{"slug":"/git-pull-with-rebase/","previous":{"fields":{"slug":"/hello-world/"},"frontmatter":{"title":"Hello world - yet another developer blog"}},"next":{"fields":{"slug":"/where-i-get-knowledge/"},"frontmatter":{"title":"Where I get knowledge"}}}}