Change the username for Git in Xcode?

前端 未结 4 1488
[愿得一人]
[愿得一人] 2021-01-31 11:11

Is there any way to change the Git username and email for Xcode? When I try commit now it will post my real name. I want it to post my GitHub username so that you can link commi

4条回答
  •  情话喂你
    2021-01-31 11:39

    Since I have multiple projects with different commit names, the solution provided by @sergtk does not work for me. Instead, I did the following:

    xcrun git config --local user.name 'new_user_name'
    xcrun git config --local user.email 'new@email.com'
    

    Also, note that the first commit needs to be changed, so I used the solution provided here to fix this: Change the author and committer name and e-mail of multiple commits in Git

提交回复
热议问题