Git clone A warehouse to the local, and then want to submit to the new remote warehouse B, there is the following problem?

problem description

  1. clone A copy of antd pro is put up locally

    git clone --depth=1 https://github.com/ant-design/ant-design-pro.git my-project
  2. created a new remote warehouse B on the unit gitlab
    wants to submit the local code to the remote warehouse B.
  3. pass

    git remote set-url origin git@git.xxx.cn:wanjx/xxx2.0.git

    change the remote warehouse address of the local warehouse from antd pro to the new warehouse B address for yourself

  4. git push origin master.
The problem with

is

clipboard.png

fatal: Failed to traverse parents of com
mit 9f89ce45715b8af83ca7dcb40eb59cbf82f2373e

do you think the problem is that the copied code warehouse address conflicts with the newly built warehouse address?

the platform version of the problem and what methods you have tried

also searched https://stackoverflow.com/que.
tried not to work

trouble boss to take a look, how should this situation be operated?

Jul.19,2021

ask and answer your own questions. Just delete the .git file from the warehouse under clone, and it will become an ordinary warehouse

.
rm -rf .git
git init

then

git remote add origin git@xxx.cn
git pull origin master
git push origin master

is fine

Menu