mangreen / Some-Note

Development Memo
1 stars 0 forks source link

Bitbucket - Change the remote URL to your repository #17

Open mangreen opened 7 years ago

mangreen commented 7 years ago

Change the remote URL to your repository

https://confluence.atlassian.com/bitbucket/change-the-remote-url-to-your-repository-794212774.html

1. Navigate to your repository's directory in a terminal window using the command cd path/to/your/repository.

2. Run the following command (which modifies the fetch URL) from your terminal window:

# For SSH
git remote set-url origin git@bitbucket.org:{new team or account name}/{repository name}.git
# For HTTPS
git remote set-url origin https://{username}@bitbucket.org/{new team or account name}/{repository name}.git

3. Run the following command (which modifies the push URL) from your terminal window:

# For SSH
git remote set-url --push origin git@bitbucket.org:{new team or account name}/{repository name}.git
# For HTTPS
git remote set-url --push origin https://{username}@bitbucket.org/{new team or account name}/{repository name}.git