Removing '.git' directory from git repo?

后端 未结 5 1976
名媛妹妹
名媛妹妹 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:59

    Have you tried with the following command ?

    git filter-branch --tree-filter 'rm -Rf .git' HEAD
    

    git filter-branch documentation indicates that this would be slower than --index-filter, but it could do the job.

提交回复
热议问题