SourceTree: Common Troubleshooting Guide
A collection of fixes for common SourceTree issues: startup crashes, rebase failures, and password resets.
SourceTree Troubleshooting Guide
This post aggregates solutions for common issues encountered when using Atlassian SourceTree on Windows.
1. SourceTree Crashes on Startup
Symptoms
SourceTree fails to open or crashes immediately upon launching.
Cause
The most likely reason is a corrupted user.config file. If this file is damaged, it often contains a series of <NULL> values.
Resolution
- Navigate to the local configuration folder:
C:\Users\<User>\AppData\Local\Atlassian\SourceTree.exe_<random_string>\<version_number> - Locate the
user.configfile. - Delete the file.
- Restart SourceTree. The application will regenerate a fresh configuration file closely matching your previous settings.
2. Recovery from Failed Rebase (Missing Commits)
Symptoms
During a rebase with conflicts, SourceTree might fail and seemingly “drop” your last commit or leave the repository in a detached state.
Resolution
You need to find the commit hash of your state before the rebase started and reset your branch to it.
- Open the terminal (in SourceTree or external).
- Show the reference logs to find your previous commit:
git reflog - Identify the commit ID (SHA) you want to return to.
- Hard reset the branch to that commit:
git reset <commitId> --hard - Recommendation: For complex rebases involving conflicts, it is safer to perform the rebase using
git bashor another command-line tool instead of SourceTree’s UI.
3. How to Change or Reset Password
If SourceTree is stuck with old credentials or you need to force a password prompt (e.g., after changing your Bitbucket/GitHub password), follow these steps.
Resolution
- Close SourceTree.
- Navigate to the following directory:
%localappdata%\Atlassian\SourceTree\ - Delete the following files:
passwduserhost
- Restart SourceTree. It will prompt you to enter your new credentials when you next attempt a remote operation (fetch/push/pull).