0

So I have a directory with file A and file B. I need to push file A to directory dirA and file B do directory dirB. The problem is that dirA should be hosted on GitLab and dirB on GitHub. Is there any way to do so?

This should work all time, so when I make some changes I can push them to proper repositories.

Ferran Buireu
  • 28,630
  • 6
  • 39
  • 67
  • 1
    Please explain why you have two files in one directory that should go to two different git repositories! – Klaus D. Apr 17 '20 at 11:25
  • We're working on two projects at the same time. One file is testing app (with some bugs still) and the second one is app from another project that needs to be tested. So we have two repositories - one with testing app and another with project and need to fork one file from each repository to remote directory to be able to work on them at the same time. –  Apr 17 '20 at 12:16

1 Answers1

0

You can add multiple remotes with the ‘git remote add’ command. You can then push different versions of your code (using branches or commits) to different remote repositories.

Aleksey Tsalolikhin
  • 1,518
  • 7
  • 14