0

I want to use manage remotes to share my project on Bitbucket and GitHub. But there is a problem. When I add a git link of GitHub to manage remotes section, and then when I click push, GitHub seems but Bitbucket doesn't seem. Screenshots are below.

enter image description here

enter image description here

.git config like this:

enter image description here

If I write Bitbucket to remote in branch section and push again, this time it pushes to Bitbucket. But I want to push both at one time. Thanks for answers.

LazyOne
  • 158,824
  • 45
  • 388
  • 391
emrez
  • 316
  • 2
  • 11
  • Does this answer your question? [Git - Pushing code to two remotes](https://stackoverflow.com/questions/14290113/git-pushing-code-to-two-remotes) – fredrik Aug 17 '21 at 13:46
  • Thanks for the answer my problem has fixed. – emrez Aug 20 '21 at 14:36

1 Answers1

2

Unfortunately, PhpStorm doesn’t support pushes to multiple remotes. As a workaround you could set in your config "pushUrl" like this:

[remote "github"]
    url = <url1>
    pushUrl = <url1>
    pushUrl = <url2>

Or as mentioned in comments, use the following commands:

git remote set-url --add --push origin git://original/repo.git
git remote set-url --add --push origin git://another/repo.git
Rodj
  • 36
  • 3