It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Change the author and committer name and e-mail of multiple commits in a bitbucket git repository

I have a repository which is already pushed to origin (online repo).
I need to change author of 2 older commits.

This happens because this buggy sourcetree (YES, IT IS, IT'S THE LATEST OF THE HUNDRED PROBLEMS IT GAVE ME, COMPANY FORCES ME TO USE IT) seems to have fun changing continuously the git project settings from the various authors available working on the same machine. I put the settings for commit to "John <john@company.com>" and from time to time, whenever sourcetree wants to have fun, it changes it to "John <jim@Anothercompany.com>" or "Jack <jack@SomeOthercompany.com>" because these profiles are present on the machine.

I have saved multiple time the project settings, even tried to use global settings with my name but this bug-ridden productivity-hindering piece of software keeps acting his own way.

How to change the old author from sourcetree (NOT git console)?

Kinda like amend or whatever you want

2 answers

2 votes
Mike Corsaro Atlassian Team May 31, 2018

Hello! Unfortunately this isn't something you can do via Sourcetree. We don't have many features to allow rewriting history, and it's generally not advised to do so.

 

However, to make your username issues a bit less annoying:

  • Open Options, and check "Allow Sourcetree to modify your global Git and Mercurial config files"
  • Open the repository, open the repo settings (top right gear), and make sure "Use global user settings" under advanced is checked
  • Sourcetree will now modify your git settings (which can be found in 'C:\Users\<username>\.gitconfig' under '[user]')

If you don't want Sourcetree to modify this config:

  • Make sure "Allow Sourcetree to modify your global Git and Mercurial config files" is unchecked
  • Open your .gitconfig (C:\Users\<username>\.gitconfig), and under '[user]' change your desired username
  • Restart Sourcetree
  • Your username for will now be whatever is set in your .gitconfig

Be aware that other programs on your PC may modify your .gitconfig and overwrite it with a different username. Visual Studio has known to do this.

0 votes
Manju Atlassian Team May 29, 2018

Can you please specify if this is on Windows or macOS and what version of Sourcetree you are using?

Windows 10, last sourcetree version

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Sourcetree

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

4,902 views 0 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you