Git:如何作为其他人承诺?
我在做一个自由职业者的项目。客户(我们叫他foobar)要求我使用他的github帐户上传代码(我的工作电脑运行64位Windows 10,我安装了git 2.15.0) 所以我做了这些步骤Git:如何作为其他人承诺?,git,github,Git,Github,我在做一个自由职业者的项目。客户(我们叫他foobar)要求我使用他的github帐户上传代码(我的工作电脑运行64位Windows 10,我安装了git 2.15.0) 所以我做了这些步骤 转到凭据管理器->Windows凭据->通用凭据。删除了我的Github帐户 在源代码目录上,执行标准过程: git init git add * git commit -m "first message" git remote add origin https://github.com/foobar/su
git init
git add *
git commit -m "first message"
git remote add origin https://github.com/foobar/supersecretproject.git
git push -u origin master
等一会儿,代码被提交到Github。打开Github页面,奇怪的是显示的提交者是我,而不是foobar。奇怪。如何解决这个问题?我想提交为foobar您还需要为git配置您的姓名和电子邮件:
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
如果您只想更改一个回购的配置设置。您可以尝试以下步骤:
git init
git add *
git commit -m "first message"
git remote add origin https://github.com/foobar/supersecretproject.git
git push -u origin master
1) 在终端上,将当前工作目录更改为要在其中配置与Git提交关联的名称和电子邮件的本地存储库
2) $ git config user.name "Elon Musk".
3) $ git config user.email "elonmusk@tesla.com"
3) 确认您已正确设置Git用户名和电子邮件:
$ git config user.name
> Elon Musk
$ git config user.email
> elonmusk@tesla.com
完成了!:)
希望这能有所帮助 可能重复的