git - git大量文件没有被跟踪
问题描述
我是 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
请指导我缺少什么导致我的大多数项目文件未被跟踪。
谢谢
解决方案
好的,事实证明 git 没有跟踪我的 Web 项目的原因是完全不相关的。在 IIS 中,我的 Web 项目目录与 git 项目文件夹中的不同。一旦我意识到并将 IIS 目录更改为 git 目录,它就开始按预期工作。发布我的发现,以便如果其他人遇到类似情况来到这里,可能会帮助他们确定去哪里寻找。非常感谢那些试图提供帮助的善良的灵魂
推荐阅读
- c++ - 以全局变量名称为输入并更改其值的函数
- html - 转换问题:translateX 和 translateY
- hibernate-validator - 无法启动quarkus:java.lang.ArrayIndexOutOfBoundsException:1
- flask - 使用 Firestore 和 Flask/Jinja,正确的方法来查询和显示结果到 DOM
- json - Typescript 使用接口创建 JSON 对象
- python - python pandas数据框错误'DataFrame'对象没有属性'DataFrame'
- verilog - Verilog 模块实例化顺序重要吗?
- json - 转到模板 HTMLEscape json 数据并显示“””问题
- python - 模拟配送线中包裹的过渡
- python - 如何在python中获得特定范围内的免费端口