У меня возникли проблемы при попытке перенести мой существующий репозиторий GitHub в Bitbucket. Я использовал терминал, чтобы использовать git remote add, как указано в инструкциях, но он продолжал сообщать fatal: the remote origin already exists
. Также, когда я пытаюсь толкнуть его, ничего не происходит. Я посмотрел ответы здесь, чтобы изменить имя, но я использовал ссылку GitHub, и ничего не произошло. Я не знаю, правильно ли я назвал мой форк удаленным источником и исходным репо. У кого-нибудь еще была подобная проблема, с которой я столкнулся? Я довольно плохо знаком с тем, как это работает, и до сих пор учусь.
git remote add
git remote rm
git push -u origin
$ git init
Reinitialized existing Git repository in /Users/appleuser/Desktop/axios-react/.git/
$ git remote add origin https://XXX@bitbucket.org/crowddoingmedicinalfoods/react.git
$ git push -u origin master
remote: Forbidden
fatal: unable to access 'https://XXX@bitbucket.org/crowddoingmedicinalfoods/react.git/': The requested URL returned error: 403
$ git clone https://github.com/ItsAntP/axios-react-github.git
Cloning into 'axios-react-github'...
remote: Enumerating objects: 27, done.
remote: Counting objects: 100% (27/27), done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 27 (delta 5), reused 27 (delta 5), pack-reused 0
Unpacking objects: 100% (27/27), done.
$ git remote -v
another_origin https://github.com/ItsAntP/axios-react-github.git (fetch)
another_origin https://github.com/ItsAntP/axios-react-github.git (push)
destination https://XXX@bitbucket.org/crowddoingmedicinalfoods/react.git (fetch)
destination https://XXX@bitbucket.org/crowddoingmedicinalfoods/react.git (push)
origin https://github.com/ItsAntP/axios-react-github.git (fetch)
origin https://github.com/ItsAntP/axios-react-github.git (push)
upstream https://github.com/ItsAntP/axios-react-github.git (fetch)
upstream https://github.com/ItsAntP/axios-react-github.git (push)
$ git remote add origin https://XXX@bitbucket.org/crowddoingmedicinalfoods/react.git
fatal: remote origin already exists.
$ git push origin master
Everything up-to-date
$ git push -u origin master
Branch 'master' set up to track remote branch 'master' from 'origin'.
Everything up-to-date