Reputation: 1601
I have a solution with two projects. One of them is the main one and I have the 2nd one referenced. However, the 2nd one isn't added to the git changes, and when I push, it only pushes the main project, not the whole solution. How can I add the whole solution to be tracked by git ?
Upvotes: 2
Views: 1141
Reputation: 3977
This can happen for a few reasons. Try the following:
.gitignore
file and make sure you aren't ignoring the second project's folder.git
folder.git
folder isn't under your first project folderEdit: Okay, based on your comment we know the second project is in the wrong place. You could move your second project underneath the first one but I wouldn't recommend it. The convention with Visual Studio is to have projects in separate folders either at the same level or underneath the .git folder. Depending on the complexity of your project it might just be easier to recreate the correct folder structure somewhere else and create a new repository.
See the Dapper project on GitHub for an example of the project layout convention. The Dapper.sln file is at the same level as the .git
folder and projects like Dapper.Contrib and Dapper.EntityFramework are in separate folders underneath that.
Upvotes: 1