git large number of files are not being tracked

148 Views Asked by At

I am new to git ,my aim to setup my local repository and use to track changes to my code. Here is what I have done and the problem that I am facing:

1. create a new remote repository(in my local network).(done using gitstack)
2. identify a local folder where mode is and use it as repository
   C:\projects\proj1
3. CD to above folder and ran following command
$  git init
4. Then I added all the code into local git rep
   $ git add .
   I tried few things above, Once I noticed many files were not being tracked  I used $ git add -A as well, but no difference
5. I then did my first commit
   $ git commit -am "initial commit"
6. I added this to remote by this
   $ git remote add origin https://ipaddress/repname.git
7. Finally I pushed all content of local to remote
   $ git push origin master
8. At one point for item 7 I did this as well
   $git push --set-upstream origin master and may be few other things

Problem is whatever I do, only few files are being tracked, My project has code which compiles into C# dlls as well as a web component, all the code in dlls is tracked but the one which is part of web project does not, here is the directory lay out

C:\projects\proj1\.git
C:\projects\proj1\visualstudioproject.sln
**C:\projects\proj1\tracked1\
C:\projects\proj1\tracked2\**
C:\projects\proj1\webcomponentwhereweconfigfileis\

for some reasons files in tracked1 and tracked2 are being tracked but for anything else, once I make changes I always get this

$ git status
  On branch master
  Your branch is up to date with 'origin/master'.

  nothing to commit, working tree clean

Please guide what am I missing which is causing most of my project files to be not tracked.

Thanks

1

There are 1 best solutions below

0
On

Ok so it turned out the reason git was not tracking my web projects was completely unrelated. In IIS my web projects directory was different then what it was in the git project folder. Once I realized and changed IIS directory to git directory it all started working as intended. Posting my findings so that if some one else comes here in similar situation, may be it will help them to determine where to look. Really appreciate for kind souls who tried to help