This post is how to install/Configure SourceTree.
Step 1
Install SourceTree.
Step 2
Install Beyond Compare.
Step 3
Install Git
Step 4
Create or Import your SSH key by going to SourceTree and clicking Tools then click “Create or import SSH Keys”. Follow the instructions then click “Save public key” and “Save private key” next to “Save the generated key”. Save public key to C:\Users\<USER>\.ssh\id_rsa.pub. Save private key to C:\Users\<USER>\.ssh\id_rsa.
Step 5
Update to latest SourceTree build by opening SourceTree click Tools –> Options then click “Updates” tab and update if required.
Step 6
Configure any options you want by going to Tools –> Options.
General Tab
- Choose your theme
- Setup SSH Client Configuration
- Setup Default user information
- Set your remote check for updates
- Reopen repository tabs at startup
- Spell check commit messages
Diff Tab
- Convert tabs to spaces with width 4
- External Diff tool Beyond Compare
Git Tab
- Set Global Ignore List
- Prune tracking branches no longer present on remote(s)
- Push all tags to remotes
- Fetch all tags
Authentication Tab
Setup any auth you have.
Step 7
Setup C:\Users\<USER>\.gitconfig like the below.
[core] autocrlf = true [user] name = GaudreaultPC\\Gaudreault email = oliver@gaudreault.ca [difftool "sourcetree"] cmd = 'C:/Program Files/Beyond Compare 5/BCompare.exe' \"$LOCAL\" \"$REMOTE\" [mergetool "sourcetree"] cmd = "'' " trustExitCode = true [safe] bareRepository = explicit
Step 8
If you are trying to transfer your SourceTree from one PC to another. The below are the steps you will need to perform.
- Copy your data from one PC to the other in the same exact folder structure. Include .git and .gitignore files and folders.
- On original PC go to %USERPROFILE%\AppData\Local\Atlassian\SourceTree and copy the following files to the new PC.
- bookmarks.xml
- opentabs.xml
- On the new PC close SourceTree and copy the two files from the previous step and copy to the same location as was in original PC.
- Ensure the new laptop has the same .gitconfig from old PC.
Step 9
Sometimes you might have issue with the repository settings for each repo. If you do just go in and fix it. Remove the origin and add back. Ensure you select “Default Remote”.
You must be logged in to post a comment.