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 <firstname.lastname@example.org>" 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
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:
If you don't want Sourcetree to modify this config:
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.
I'm on 3.2.6 on Win10. Currently, I have trouble with my global settings, I was hoping the second method would help but it has not.
What has been happening is that I end up commuting with undesired Author information: both the name and the email are wrong. I suspect that Sourcetree is grabbing information from tools > options > authentication and using it as my Author info.
I have the name and email settings I want to be used in the gitconfig file. But the only way I have been able to commit using that information is to go into each of my repos: settings > advanced > user information > uncheck the box "Use global user settings"
The Author text that shows up under the check box is always what I want to use, but only when I uncheck the box am I able to commit with said text.
Again, I tried your second method hoping it would help, but no luck.
Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...
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