<?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: Mauricio Carvalho</title>
    <description>The latest articles on DEV Community by Mauricio Carvalho (@oak).</description>
    <link>https://dev.to/oak</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%2F376827%2F8f8ae77f-e9c0-4da7-afa2-5eb99b56f097.jpg</url>
      <title>DEV Community: Mauricio Carvalho</title>
      <link>https://dev.to/oak</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/oak"/>
    <language>en</language>
    <item>
      <title>[git notes] Fix `git push -u` The current branch has no upstream branch error
</title>
      <dc:creator>Mauricio Carvalho</dc:creator>
      <pubDate>Tue, 17 Nov 2020 18:06:46 +0000</pubDate>
      <link>https://dev.to/oak/git-notes-fix-git-push-u-the-current-branch-has-no-upstream-branch-error-128e</link>
      <guid>https://dev.to/oak/git-notes-fix-git-push-u-the-current-branch-has-no-upstream-branch-error-128e</guid>
      <description>&lt;p&gt;The error bellow happens everytime that I need to push a brand new brach to a remote git server using the command &lt;code&gt;git push -u.&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fatal: The current branch &amp;lt;branchname&amp;gt; has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin &amp;lt;branchname&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Git needs to configure the push strategy to auto create a remote mirror of your new branch automatically. The command to do that is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; git config --global push.default current
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it!&lt;/p&gt;

&lt;p&gt;For more details, you can check the docs &lt;a href="https://git-scm.com/docs/git-push"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
    </item>
  </channel>
</rss>
