<?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: Gad Omuse</title>
    <description>The latest articles on DEV Community by Gad Omuse (@omusegad).</description>
    <link>https://dev.to/omusegad</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%2F116310%2Fa89251bc-7d62-40a5-a9c7-054b41373335.gif</url>
      <title>DEV Community: Gad Omuse</title>
      <link>https://dev.to/omusegad</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/omusegad"/>
    <language>en</language>
    <item>
      <title>Git Problem With "src refspec does not match any"</title>
      <dc:creator>Gad Omuse</dc:creator>
      <pubDate>Thu, 09 Mar 2023 09:11:06 +0000</pubDate>
      <link>https://dev.to/omusegad/git-problem-with-src-refspec-does-not-match-any-3pg</link>
      <guid>https://dev.to/omusegad/git-problem-with-src-refspec-does-not-match-any-3pg</guid>
      <description>&lt;h1&gt;
  
  
  Main Problem
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Pushing an Empty Repo unknowingly
&lt;/h1&gt;

&lt;p&gt;The main course of this issue is publishing an empty repo to non existing branch. Mostly, one tend to create a git repo by following git autogenerated procure while skipping to commit. As referenced, we failed to commit README.md file.   &lt;/p&gt;

&lt;p&gt;$ git init &lt;br&gt;
$ git add README.md&lt;br&gt;
$ git branch -M main&lt;br&gt;
$ git remote add origin &lt;a href="https://github.com/profile/repository.git"&gt;https://github.com/profile/repository.git&lt;/a&gt;&lt;br&gt;
$ git push -u origin main&lt;/p&gt;

&lt;h1&gt;
  
  
  Quick fix
&lt;/h1&gt;

&lt;p&gt;One can resolve this issues by committing all the files immediately adding.&lt;/p&gt;

&lt;p&gt;$ git init&lt;br&gt;
$ git add .&lt;br&gt;
$ git branch -M main&lt;br&gt;
$ git add .&lt;/p&gt;

&lt;h1&gt;
  
  
  $ git commit -m "message"
&lt;/h1&gt;

&lt;p&gt;$ git remote add origin &lt;a href="https://github.com/profile/repository.git"&gt;https://github.com/profile/repository.git&lt;/a&gt;&lt;br&gt;
$ git push -u origin main &lt;/p&gt;

&lt;p&gt;...and would save lots of time, keep giting!&lt;/p&gt;

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