Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9252755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:01:49+00:00 2026-06-18T11:01:49+00:00

I converted a few mercurial repos to git using the hg-fast-export tool and while

  • 0

I converted a few mercurial repos to git using the hg-fast-export tool and while all of them were converted fine, one produced the following error when I pushed the repo.

$ git remote add origin git@github.com:asdf/zxcv.git
$ git push -u origin master
Counting objects: 7840, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2817/2817), done.
error: object 324f9ca2aaae7b1d716db3fc31c02d391c1c2c16:contains '.git'
fatal: Error in object
error: pack-objects died of signal 13
error: failed to push some refs to 'git@github.com:asdf/zxcv.git'

“contains ‘.git'” error has very broad terms and couldn’t find any documentation so I tried to search for an existing ‘.git’ folder in the original repo and I did. There was a subsubsub-folder that contains an instance of an old git repository which I removed with git rm, however, the problem remained.

Is there anyway I can push this to github or a new clean repo is the only option?

Any help in this appreciated.
Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T11:01:51+00:00Added an answer on June 18, 2026 at 11:01 am

    You can use the convert command with a filemap to strip the git repo from the repository. After that it will be gone from the history, and the repository will be safe for importing to git.

    Example:

    $ echo "exclude path/to/.git" > my-filemap
    $ hg convert --filemap my-filemap originalrepo newrepo
    

    Note that convert is a bundled extension which you first need to enable in your .hgrc like so:

    [extensions]
    convert =
    

    For more information see hg help convert.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I converted a Subversion repository to Mercurial a few months back and I wound
I have some changesets from a few months ago where I converted from one
I converted my whole site to XML/XSL and I would like to know all
I converted an old cvs repository into mercurial via hg convert . Everything seemed
I converted a very large svn repository to a git repository with git svn
We use a few tweaked Build Process Template, developed for TFS2010 for all of
Let's say we have a Lucene index having few documents indexed using StopAnalyzer.ENGLISH_STOP_WORDS_SET .
There are a few different ports of Box2D for JavaScript. Which one is the
I have a few JasperReports made and running very fine on a Windows machine.
I am using lxml to read through an xml file and change a few

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.