Create New Git Repo From Shallow Clone
Wednesday 27 January 2021How 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
No comments