【问题标题】:GIT - config --global user.nameGIT - 配置 --global 用户名
【发布时间】:2013-10-21 06:57:37
【问题描述】:

我在一个项目上使用git,每次我想在终端中提交一些东西,我都必须输入这行命令:

git config --global user.name "myusername"

我刚刚更换了我的电脑,我不必在我以前的笔记本电脑上这样做。有没有办法跳过这个阶段?

非常感谢!

【问题讨论】:

  • 如果您在全局范围内设置,您应该每次设置只需要执行一次,看起来就像您一样。如果在提交前不设置会出现什么错误?

标签: git logging configuration terminal config


【解决方案1】:

使用编辑您的全局配置

git config --global -e

如果以下部分尚不存在,请添加:

[user]
    name = Your Name
    email = your.email@example.com

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-03-13
    • 1970-01-01
    • 1970-01-01
    • 2023-01-09
    • 1970-01-01
    • 2022-10-30
    相关资源
    最近更新 更多