Jan. 27, 2021, midnight

Create New Git Repo From Shallow Clone

By : Eric A. Scuccimarra

How to create a new git repo from a shallow clone to not keep the history.

git clone [old repo] --depth 1

git remote add new_source [new repo]

git remote remove origin

git rev-parse --verify master >> .git/info/grafts

git filter-branch -- --all git push new_source master

Labels: git

There are no comments for this article.

Login or register to comment