TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

How do I push to a repository in GitHub in a situation like this?

2 pointsby shivajikobardanalmost 2 years ago
I write my notes in Joplin.<p>I export them as .md (markdown).<p>It turns them into two folders<p>Resources<p>NGINX@HOME (The name of my note book)<p>Resources consists of images.<p>NGINX@HOME consists of markdown file.<p>Now, I push them into github using this post<p>https:&#x2F;&#x2F;stackoverflow.com&#x2F;a&#x2F;63645193&#x2F;19901123<p>Next time, I write 2nd note on NGINX.<p>I write it in the same notebook as earlier.<p>I export it as .md.<p>Again it makes the two folders with same name as above because the notebook is same.<p>Now, I want to to push that code to github to the same repository.<p>But when I try it I get various errors.<p><pre><code> error: failed to push some refs to &#x27;https:&#x2F;&#x2F;github.com&#x2F;&lt;my_github_id&gt;&#x2F;my_notes.git&#x27; hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., &#x27;git pull ...&#x27;) before pushing again. hint: See the &#x27;Note about fast-forwards&#x27; in &#x27;git push --help&#x27; for details. </code></pre> I do `git pull origin main` but it still fails to upload.<p><pre><code> fatal: refusing to merge unrelated histories </code></pre> How do I resolve this issue?

2 comments

PaulHoulealmost 2 years ago
<a href="https:&#x2F;&#x2F;www.lempjs.com&#x2F;fatal-refusing-to-merge-unrelated-histories&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.lempjs.com&#x2F;fatal-refusing-to-merge-unrelated-his...</a>
neximo64almost 2 years ago
Force push?