我正在与另一个名为B的人合作,他在我们的git存储库中添加了一个子模块。 当我想更新它时,我看到了.gitmodules:
[submodule "mod"] path = mod url = https://B@serverurl/path/modr.git我可以将此文件修改为myname@serverurl ,提交并推送它,运行git submodule sync ,但它非常愚蠢。 我不能只是将用户名留空并每次输入用户名吗?
谢谢。
I'm cooperating with another one called B, and he adds a submodule to our git repository. When I want to update it, I see this .gitmodules:
[submodule "mod"] path = mod url = https://B@serverurl/path/modr.gitI can modify this file to myname@serverurl, commit and push it, run git submodule sync, but it's incredibly stupid. Can't I just leave the username blank and input username each time?
Thanks.
最满意答案
url中的用户名是可选的。 您可以指示每个开发人员不要在.gitmodules中签入他们的用户名,而是通过其他方式指定。 例如,可以使用.netrc文件提供用户名。
Username in url is optional. You can instruct each developer NOT to check in their username in .gitmodules and specify it via other means instead. E.g., username can be provided using .netrc file.
更多推荐
发布评论