I'm new to using GitHub and Git , When I first created my console app I created a git repository and hit commit and push , it works fine for the console app which was present in the time of creating the git repository , but when I added a new class library(CalculatorLibrary) and started writing code in it , I realized the Changes are not detected in the git changes section and it doesn't exist in the GitHub repository either, Plz help me !
CodePudding user response:
I can see on your local repository folder pic that the Calculator Library is actually outside of your solution folder(ConsoleApp1 folder, which contains the calculator.cs project). To have them commited easily to the git all projects that are part of a solution should be under that solution folder. Hope it helps!
CodePudding user response:
You created your Git repository inside the Calculator folder. Which means git keeps track of only the files and directories which are inside this folder. If you want to track CalculatorLibrary you should have created a git repository one level higher. (which you could do by .git folder and creating a new repository in the folder that contains these two libraries)