我正在尝试对Netbeans项目进行版本控制。所以我保留在我的远程仓库中:
关键是我不想在每次构建/提交后更新nbproject文件。仅当我进行了大的更改(例如添加新的库(在所有其他情况下,使用相同的旧文件夹工作来克隆项目))时,才需要更新属性。最初,我使用2个工作目录推送了一个提交,之后我修改并提交了.gitignore添加/ nbproject,以便其他人可以克隆项目而没有引用/属性问题,并且提交源更改而无需更新nbproject文件。我的团队的想法是,每次要做大的更改(例如向项目中添加新库)时,都应通过git bash手动完成提交,从而强制nbproject文件夹进行更新,而在所有其他情况下(大多数情况下,有时)可以使用NetBeans更改并仅提交源代码来安全地完成。
当我需要添加库时,会发生此问题。在添加.jar和代码更改后,实际上我去检查git从bash看到了什么,这是输出git status
:
$ git status
# On branch newVersioning
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working dire
#
# modified: ****/nbproject/project.properties
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# lib/**************.jar
# ****/src/***/***********/****.java
no changes added to commit (use "git add" and/or "git commit -a")
我不明白为什么git可以看到(没有任何强制类型)文件project.properties的更改,而版本控制应该自动忽略该更改。这是.gitignore行
****/nbproject/
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句