美文网首页
已经clone的Git项目切换账号

已经clone的Git项目切换账号

作者: 晴了个天呀 | 来源:发表于2021-05-18 09:29 被阅读0次
    1. 新用户名
      git config --global user.name "Sam Smith"
      git config --global user.email sam@example.com

    2. 清除以前保存的密码
      git config --global --unset credential.helper
      git config --system --unset credential.helper

    3. 配置项目新的 remote url
      git remote set-url origin https://UserA@github.com/UserA/repoA.git

    重新 pull 就会提示输入新的密码

    相关文章

      网友评论

          本文标题:已经clone的Git项目切换账号

          本文链接:https://www.haomeiwen.com/subject/jidejltx.html