Removing '.git' directory from git repo?

后端 未结 5 1969
名媛妹妹
名媛妹妹 2020-12-09 16:06

I\'m trying to migrate a git repo from Kiln to Github. I can add the new remote just fine, but when I try to push master to the new remote, I get the following error:

<
5条回答
  •  眼角桃花
    2020-12-09 16:46

    As of git 2.2.22 the way to do this is with the git-filter-repo tool.

    Easy and fast:

    git filter-repo --force --invert-paths --path-glob '*/.git' --path '.git'
    

提交回复
热议问题