If you have projects on your local that are connected to different bitbucket accounts, then you might need to set default identity and one of task is to update your project git remote URL.
To do so, go to your project root directory and type the following command:
git remote -v
and you will see something like this:
origin git@bitbucket.org:foobar/hello.git (fetch)
origin git@bitbucket.org:foobar/hello.git (push)
Now, to update/replace git@bitbucket.org
with <username>@bitbucket.org
use the following command:
git remote set-url origin <username>@bitbucket.org:foobar/hello.git
and now if you type git remote -v
you will see the following:
origin <username>@bitbucket.org:foobar/hello.git (fetch)
origin <username>@bitbucket.org:foobar/hello.git (push)
Happy coding!
References:
Top comments (0)