Simple way to import GitHub repository without history

I like import.github.com – I can point staff there to start a repository from a ‘mother template’. However, while the history is important on the mother repository, staff don’t need the full version history in their child repositories, let alone all the branches etc. And it takes a long time to import. I know GitHub importer from the command line can do this easily, but is there a way to limit the depth of the import (to the last commit of the master branch) through an interface similar to import.github.com ? 

1 Like

Hi @hughparsonage,

Thanks for being part of the GitHub Community Forum. I’ll help as best I can.

There isn’t currently a way to do this via the import tool. However, as a workaround, you could delete the .git directory in the root of the local repository; create it new via git init; commit all the current files as the initial commit; and then push that to GitHub. I would highly  recommend backing up the repository before doing this, however, as it is a destructive action.

If you’d like to submit your request as an official Feature Request, you can write to us at https://github.com/contact. GitHub Staff will see and respond to feature requests there. You can include a link to this forum post in your message so that you don’t have to write out the entirety of your idea again.

Let me know if you have any other questions or if I can help with anything else.

Cheers!

1 Like

Thanks very much Nadia, I’ve lodged a feature request at the link you provided. 

Best,

Hugh.

1 Like

hey you got any updates on the feature request, Is this feature implemented?

Hi @thariqthaha,

I do not think that this feature has been implemented yet. You can view features as they are released and see a past history of recent releases on the GitHub Changelog.

Hope that helps!

2 Likes