Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 3

Simple way to import GitHub repository without history

I like -- 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 ? 

2 Replies
Community Manager
Message 2 of 3

Re: Simple way to import GitHub repository without history

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 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.


Copilot Lvl 2
Message 3 of 3

Re: Simple way to import GitHub repository without history

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