git大量文件未被跟踪

时间:2018-07-14 14:53:55

标签: git gitstack

我是git的新手,我的目标是设置本地存储库并用于跟踪对代码的更改。这是我的工作以及面临的问题:

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

问题是我要做的,仅跟踪了很少的文件,我的项目中的代码可以编译为C#dll和一个Web组件,所有dll中的代码都可以跟踪,但是作为Web项目一部分的代码却没有,这是目录布局

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

由于某些原因,跟踪了tracked1和tracked2中的文件,但由于其他原因,一旦我进行更改,我总是会得到这个

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

  nothing to commit, working tree clean

请指导我遗漏了什么,导致大多数项目文件无法跟踪。

谢谢

1 个答案:

答案 0 :(得分:0)

好吧,事实证明git不跟踪我的Web项目的原因是完全不相关的。在IIS中,我的Web项目目录不同于git项目文件夹中的目录。一旦我意识到并将IIS目录更改为git目录,所有这些都将按预期开始工作。 发布我的发现,以便如果其他人也遇到类似情况,可能会帮助他们确定要看的地方。 真的感谢尝试帮助的善良灵魂