Is there any way I could make Sourcetree portable?

Holly Grant June 4, 2013

Beginner to source control here so this might be a stupid question, but I noticed that you can select to download Git 'just for Sourcetree' and it got me wondering if you could install this program on a USB stick and run off it. Is there any way that could work?

I'd like to use Sourcetree at my university but they reset the computers every day and reinstalling each time would be a bit annoying.

14 answers

1 accepted

1 vote
Answer accepted
stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 4, 2013

(Assuming Windows version here)

You could run SourceTree just from a file location so long as the entire contents of the install directory are in there, and provided the machine has the .Net 4.5 framework installed. To avoid downloading a Git install each time, the machine would also need to have Git installed, or you would need to have that on the USB stick too and your PATH set up to include it.

9 votes
Peter Clotworthy October 15, 2014

To anyone whom needs an immediate copy of SourceTree, but does not have the needed administrator rights:

Step 1.

Verify yourself by opening cmd and executing SourceTree_xxx.exe /? and you should see the /extract switch.

Using SourceTree_xxx.exe /extract will dump the raw contents into the current folder, I was not able to specify a custom directory, but this may be a network drive issue.

Step 2.

If you tried installing the normal way, you might have seen the UAC prompt parameters it was launched with, showing the extracted directory of the MSI, but it was missing the data1.cab that gets extracted after Admin Rights are verified.

https://github.com/activescott/lessmsi/releases/tag/v1.2.0

This tool simply extracts MSI installers, but needs the data1.cab that we got from step one. Drag the SourceTree.msi file onto the application and extract

Done.

Instant useable SourceTree!

V October 15, 2014

I think you missunderstand the definition of "portable". Installation is not important, it's the settings that has to be saved/used in the same directory where the program is.

Peter Clotworthy October 16, 2014

You are correct that nothing was changed to make it portable, thus I have removed that word, but my settings always seem to transfer with the application, at least if the software detects it wasn't installed normally. This happened to my dismay when I copied it to someone else's workstation and it had my credentials still active, along with active repositories, referencing projects that didn't exist on the machine.

Like sonvi0603 likes this
Freundschaft November 5, 2014

works without a flaw for me, thanks!

diogolr January 22, 2015

Worked like a charm for me...

Urs Schulthess November 13, 2015

perfect, thanks!

3 votes
Valeriu Caraulean February 10, 2014

+1 for a portable version that will support updating itself.

3 votes
V October 19, 2013

It needs 3-4 lines of code to add to make it fully portable. Why is so hard to be incorporated is beyond common sense.

The logic behind portable apps is first to check for config files in the same directory the program is installed into (let's say it's in separate folder "config") and use them, otherwise fallback to default %USERPROFILE%\AppData\Local

Or make a new setting in config file that would control that.

Diesel Duperoy March 31, 2021

what is the code line?

2 votes
Allan Bowe March 26, 2014

+1 for portable!

1 vote
Deleted user August 5, 2020

Any news about official portable version?

1 vote
Alex Mann-Wahrenberg September 18, 2014

+1000 for portable!

1 vote
Dan Hennion June 10, 2014

+1 for portable! I have an install that has become very corrupt. Have tried reinstalling, clearing appdata, registry data, etc. The program still crashes every time I run it. Hoping for a portable version that will stop trying to use whatever corrupt data the program has on my machine. Would like to be able to bring it to work, also. Where I don't have install privilages.

1 vote
bandolero perez December 3, 2013

+1 for making a portable version for Windows, main competitor does it, check out SmartGit

http://www.syntevo.com/smartgithg/download

1 vote
stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 4, 2013

(Assuming Windows version here)

You could run SourceTree just from a file location so long as the entire contents of the install directory are in there, and provided the machine has the .Net 4.5 framework installed. To avoid downloading a Git install each time, the machine would also need to have Git installed, or you would need to have that on the USB stick too and your PATH set up to include it.

0 votes
Alan Jay Weiner June 4, 2018

I'm going through the new-machine hell (installing everything, configuring everything, making everything work the way my previous machine did...) - it's a royal pain.

+1 +1 +1 for a portable version.

Portable apps are simple - just copy to the new machine and everything just works.

Everything else is a pain, and a time-waster.

Note:  I'm looking at alternatives to any app not available in a portable version.

0 votes
diogolr September 6, 2017

The new version can be installed on c:\users\...\appdata\local folder. So, you don't need to be a system admin to install it anymore.

V September 6, 2017

Is it "can be" or "will be"?

Last time I've checked SourceTree become the absolute opposite of portabiity with it's forcibly installing itself in the location of no-user-choice whatsoever, without even asking!

Sticking with v1.9 from now on, which is still can be somewhat portable.

0 votes
Willem D'haese September 6, 2017

Any news on an official Atlassian portable Sourcetree?

0 votes
rk January 17, 2015

I've made SourceTree 1.6.12 portable based on PortableApps.com Launcher 2.2. You are welcome to test it. SourceTreePortable

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events