How can i share multiple projects in a single solution to Github?

Hello everyone,

I've been using Rider to make several games, and to reinforce code reusability i've now made a library that has common functionality that i've been working on alongside a game.
I now want to upload both of these projects to their own separate github repos, but i can't seem to find out the proper way to do that.
By default Rider seems to want to add all files to a single github repo.
I also want to make sure both repo's only contain files that are within their own project folder, so the game should not contain the library files and vice versa.

0
1 comment

Hello,

Rider can work with several repositories at the time. However, firstly, you need to set it up. Do the following for each folder that you want to commit to separate repositories:

  • Open your library project in Rider via File | Open | select the .csproj file (/Path/Solution/LibraryFolder/YourLibrary.csproj);
  • Init git repository there: Select VCS | Create Git Repository;
  • Create an appropriate .gitignore under the library project folder;
  • Create a repository on GitHub and copy the link to the repository, for ex. `https://github.com/username/reponame.git`;
  • Switch back to Rider and select Git | Manage Remotes → select “+” → paste the url → select “OK”;
  • Now you should be able to commit files for your library repository;

After doing this, you can open your solution again and Rider should discover the existing repositories;

I attached some screenshots that demonstrate what it looks like when there are several repositories.

Hope that helps. Should you experience any difficulties or have any questions, please tell me.
Have a nice day!

0

Please sign in to leave a comment.