¿Cuál es el process para actualizar los files .git después de renombrar el repository?

Renovo los repos en BitBucket y obtengo un error cuando trato de volver a presionar. Cambié el nombre de un repository y ahora veo:

cchilders:~/projects/gitflow_automation (master) $ showorigin repository does not exist. fatal: Could not read from remote repository. 

Así que hago

 $ rm -rf .git $ git init $ git remote add origin git@bitbucket.org:codyc54321/gitflow_automation.git 

Esto agrega el repository recién nombrado (el mismo repository, solo un nuevo nombre) a los nuevos files .git .

Entonces lo hice

 cchilders:~/projects/gitflow_automation $ showorigin * remote origin Fetch URL: git@bitbucket.org:codyc54321/gitflow_automation.git Push URL: git@bitbucket.org:codyc54321/gitflow_automation.git HEAD branch: master Remote branch: master new (next fetch will store in remotes/origin) cchilders:~/projects/gitflow_automation $ git pull remote: Counting objects: 70, done. remote: Compressing objects: 100% (55/55), done. remote: Total 70 (delta 20), reused 0 (delta 0) Unpacking objects: 100% (70/70), done. From bitbucket.org:codyc54321/gitflow_automation * [new branch] master -> origin/master There is no tracking information for the current branch. Please specify which branch you want to merge with. See git-pull(1) for details. git pull <remote> <branch> If you wish to set tracking information for this branch you can do so with: git branch --set-upstream-to=origin/<branch> master cchilders:~/projects/gitflow_automation $ nano FAKE cchilders:~/projects/gitflow_automation $ cmpushall "test new repo name working" [master (root-commit) 7b0a190] test new repo name working 21 files changed, 601 insertions(+) create mode 100644 .gitignore create mode 100644 FAKE create mode 100644 README.md create mode 100644 __init__.py create mode 100644 gitflow/__init__.py create mode 100644 gitflow/client.py create mode 100644 gitflow/config/__init__.py create mode 100644 gitflow/github_webdriver_client/__init__.py create mode 100644 gitflow/pivotal_tracker_webdriver_client/__init__.py create mode 100644 gitflow/user.py create mode 100644 gitflow/webdriver_base/__init__.py create mode 100644 requirements.txt create mode 100755 scripts/make_stories.py create mode 100755 scripts/open_pull_request.py create mode 100755 scripts/open_pull_request.sh create mode 100644 tests/__init__.py create mode 100644 tests/test_github_user_login_info.py create mode 100644 tests/test_github_webdriver_client/__init__.py create mode 100644 tests/test_github_webdriver_client/test_github_driver.py create mode 100644 tests/test_pivotal_tracker_webdriver_client/__init__.py create mode 100644 tests/test_pivotal_tracker_webdriver_client/test_pivotal_tracker_driver.py To bitbucket.org:codyc54321/gitflow_automation.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'git@bitbucket.org:codyc54321/gitflow_automation.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (eg hint: 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. cchilders:~/projects/gitflow_automation (master) $ git fetch cchilders:~/projects/gitflow_automation (master) $ git pull There is no tracking information for the current branch. Please specify which branch you want to merge with. See git-pull(1) for details. git pull <remote> <branch> If you wish to set tracking information for this branch you can do so with: git branch --set-upstream-to=origin/<branch> master 

Causando este problema:

 cchilders:~/projects/gitflow_automation (master) $ git pull origin master From bitbucket.org:codyc54321/gitflow_automation * branch master -> FETCH_HEAD fatal: refusing to merge unrelated histories 

¿Hay alguna manera de cambiar el nombre de un repository en BitBucket o GitHub?

No sé si va a funcionar, pero supongo que puedes probar estos,

Prueba git pull --rebase

ver este enlace

Puedes usar --allow-unrelated-histories para forzar la fusión a suceder así

 git pull origin branchname --allow-unrelated-histories 

Espero que esto ayude.

El git pull origin master --allow-unrelated-histories de git pull origin master --allow-unrelated-histories funcionó:

enter image description here

mostrando una extraña parte desprendida reunida, donde la he cambiado de nombre y he eliminado .git