配置 Git 帐户 VSCode
Configuring Git Account VSCode
我 运行 遇到了一个问题,我对存储库 (org repo) 进行了编辑,并意外地用我的个人 git 帐户提交了它们。结果,repo 上的提交历史显示 Committed & Authored 身份来自个人帐户而不是官方帐户。在提交更改之前,是否可以为每个回购强制执行任何插件或验证?
或者是否有任何有效的方法来管理多个 git 中心帐户?
我在 windows 并使用 VS Code 作为 IDE。
我总是喜欢使用(如documented here):
git config --global user.useConfigOnly true
那样的话,我不得不在 local 中的每个新本地 Git 存储库上设置正确的 user.name
/email
Git 特定存储库的配置。
任何操作存储库的工具(例如 VSCode 进行新提交)都会从正确的用户那里受益。
OP Bugata also mentions the
I am able to view the Author while editing itself.
我 运行 遇到了一个问题,我对存储库 (org repo) 进行了编辑,并意外地用我的个人 git 帐户提交了它们。结果,repo 上的提交历史显示 Committed & Authored 身份来自个人帐户而不是官方帐户。在提交更改之前,是否可以为每个回购强制执行任何插件或验证?
或者是否有任何有效的方法来管理多个 git 中心帐户?
我在 windows 并使用 VS Code 作为 IDE。
我总是喜欢使用(如documented here):
git config --global user.useConfigOnly true
那样的话,我不得不在 local 中的每个新本地 Git 存储库上设置正确的 user.name
/email
Git 特定存储库的配置。
任何操作存储库的工具(例如 VSCode 进行新提交)都会从正确的用户那里受益。
OP Bugata also mentions
I am able to view the Author while editing itself.