Git SubModule Visual Studio [英] Git SubModule Visual Studio

查看:208
本文介绍了Git SubModule Visual Studio的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在转向Git。现在我已阅读了所有说Git不使用子模块的内容,但我认为它符合我们的目的。我们有共享库,无论他们在哪个项目中都需要更新,然后同步回服务器。



我已经将该项目添加到git中,添加了一个子项目,这一切似乎工作。然而,一个非常奇怪的事情发生时,只要我在Visual Studio中保存一个文件,这个文件是子项目的一部分,它不再将它标记为变化,我不能再提交或推送它。它在主项目中运行良好。它标记为已更改,直到文件被保存,然后消失?





任何线索/提示都会得到真正的赞赏

解决方案

VisualStudio UserVoice中有一个请求允许使用VS提交对子模块的更改,请求指定以下内容:


与我们在GIT存储库中的文件相同的功能应该是
可用于子模块中的文件:




  • 能够提交对子模块的更改

  • 当前分支,待处理的更改和未发布的提交显示在VS窗口底部
  • li>
  • 关于文件的最小化信息(n更改| n作者,
  • 查看历史记录/注释/与未修改的比较



如果您还希望实施这些功能,请投票 here ,所以它会得到优先级


We're moving to Git. Now i've read everything which says don't use submodules with Git, however, I think it fits our purpose. We have shared libraries that need to be updated no matter which project they're in and then synced back to the server.

I've added the project to git, added a subproject and that all seems to work. However, a really weird thing happens, as soon as I save a file in visual studio that's part of the subproject, it no longer marks it as a change and I can no longer commit it or push it. It all works fine in the main project. It marks it as changed until the file is saved and then it disappears?

Any clues/tips would be really appreciated

解决方案

There is a request in VisualStudio UserVoice to allow Commit changes to a submodule using VS, the request specifies the following:

The same features that we have for files in GIT repositories should be available for files in submodules, too:

  • being able to commit changes to the submodule
  • current branch, pending changes and unpublished commits being displayed at bottom on VS window
  • mini-info about the file (n changes | n authors, n changes)
  • view history / annotate / compare with unmodified
  • etc.

If you also want these features to be implemented please vote here so it will get prioritized

这篇关于Git SubModule Visual Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆