14

I have a team project in Visual Studio Team Services and I'm using git as a version control system.

Is it possible to change the author name and email of the commits in Visual Studio website ?

Mohammed
  • 1,432
  • 4
  • 18
  • 34
  • Talking about pure git, the answer is "yes". If it's many revisions, you might consider using git filter-branch to do it. If it's only a few revisions, you might consider amending them (and cherry-pick whatever was on top of them). https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History – eftshift0 Mar 27 '17 at 14:31
  • I know how to do that for local git projects. But I want to do it in visualstudio.com because my project is hosted there. I couldn't find any option in the website for changing the author information. – Mohammed Mar 27 '17 at 14:35
  • 1
    Can't do the change locally and then use ```git push -f``` to force whatever you have locally to replace the remote content? – eftshift0 Mar 27 '17 at 14:36
  • @Edmundo It worked. Thanks! – Mohammed Mar 28 '17 at 04:12

1 Answers1

38

Your author name and email address is bound to your commits and mostly taken from your global Git settings, not your VSTS account. Change your display info through Team Explorer > Settings > Repository Settings.

Git name and email


In case you want to change it through Git shell:

To set your username for a specific repository, enter the following command in the root folder of your repository:

git config user.name "Billy Everyteen"
# Set a new name
git config user.name
# Verify the setting
Billy Everyteen

Source


EDIT: Just noticed you're talking about existing commits, take a look at Change commit author at one specific commit.

Community
  • 1
  • 1
ginomessmer
  • 589
  • 4
  • 11