youngmon/atlassian-qna huggingface dataset:
Does SourceTree have an Open With
Asked by Philip Cannata:

When I click right on a file, I see "Open"but not and "Open With". Is it possible to add this to the menu?


Answers:
author: Johannes Kilian
body: There's already a feature request: [](https://jira.atlassian.com/browse/SRCTREEWIN-875)<https://jira.atlassian.com/browse/SRCTREEWIN-875>

... but Atlassian implemented it in a more generic way (at least in SourceTree for Windows):

* In the context menu you find an entry: "Custom action". This can be used to call an external application with the given file
* The custom action can be configured via "Tools-\>Options-\>Custom Actions" ...

Hope that helps ...

comments: author: Philip Cannata
body: Thanks for teh response, but I don't see "Tools"


author: Seth
body: Are you using SourceTree on Windows or Mac?


author: Philip Cannata
body: I'm using SourceTree on Mac


author: Seth
body: The above solution is Windows-only. I use Windows as well, so I don't know if there is a solution on Mac.


author: Philip Cannata
body: On the Mac, if I go to "Actions-\>Custom Actions" the menu has no items, bummer.


author: Seth
body: You'd have to create the actions yourself. You'll need to know the command line arguments to launch a file into the software you want.


author: Philip Cannata
body: The command line would be open -a /Applications/TextWrangler.app myfile.txt but where do I put it, i.e., how do I create and action with this command line?


author: Seth
body: In windows, the Custom Actions window has an "Add" button. When I click that it has me give the action a name, specify the script, and specify the parameters. It lists the variables you can use in the parameters ($REPO, $FILE, and $SHA).
Sourcetree: allow Stash Hosted Projects to use SSH
Asked by nickygerritsen:

We have set up Stash and Sourcetree. When adding Stash as an account in Sourcetree, it will always use "HTTPS" as protocol.

However, our stash still runs over HTTP. I'd like to use SSH for projects. Although we will later switch HTTP to HTTPS, I still feel better if we could use SSH.

Of course it is possible by cloning the project ourselves or by clicking the link in Stash, but I like the hosted projects feature.

Is it possible to let change the prefered protocol in Sourcetree?


Answers:
author: cofarrell
body: Hi Nicky,

Unfortunately not at the moment. This is mostly Stash's fault as we never exposed the SSH Clone URL from our REST, and so Sourcetree had no way of providing the option. Please watch/vote for the following.

[](https://jira.atlassian.com/browse/SRCTREE-2072)<https://jira.atlassian.com/browse/SRCTREE-2072>

Cheers,

Charles

comments: author: Simon Lieschke
body: Will that issue also cover getting support added for the Windows SourceTree client? (I ask as the project the issue is logged against is specifically "SourceTree for Mac".)


author: Seth
body: According to my understanding of Charles' explanation, it shouldn't be logged against SourceTree at all, but against Stash.


author: cofarrell
body: Hi Seth,

Both Stash and SourceTree need to be updated. We've updated Stash 2.11 to include this information:

[](https://jira.atlassian.com/browse/STASH-3160)<https://jira.atlassian.com/browse/STASH-3160>

SourceTree now need to make use of it. Hopefully for both the Mac and Windows versions. Simon you may want to leave a comment on that issue though.

Charles


Tags: bitbucket-server

ssh
SourceTree Liscense/Trial Prompt
Asked by Travis Perkins:

When opening this application it is prompting for liscense import or new registration. Is this just as a individual registration or is there a different license that is needed for the application? If the application is to be used by multiple people within an office is there a group license that is needed?


Answers:
author: Richard Bywater
body: See <https://answers.atlassian.com/questions/303753/sourcetree-free-license>
Link to download SourceTree license file gives "Page not found"
Asked by Joseph Wielgosz:

Starting from here: [](https://my.atlassian.com/product)<https://my.atlassian.com/product>

I click the text that says:

Download your SourceTree license. Within SourceTree select from the menu bar "SourceTree \> Registration", click "Import License" to import the downloaded the license file.

But I all I get is a "Page not found" error. I tried opening a brand-new account with a new email address; same problem. Is anyone else encountering this?


Answers:
author: Joseph Wielgosz
body: Same problem as here:

[](/questions/253299/download-your-sourcetree-license-broken-link)<https://answers.atlassian.com/questions/253299/download-your-sourcetree-license-broken-link>

Work-around of using in-app registration was successful.


Tags: my.atlassian
How do I unshelve changes
Asked by Chris Venus:

I found myself accidentally making changes in the wrong branch before I checked anything in. I tried to switch branch and it told me I couldn't because I had outstanding changes. I read that I could shelve changes, switch branch and then retrieve those changes on the correct branch.

I have done the first two steps but now can't find a way to actually unshelve the changes. I can't find anything in menus either in the toolbar or context menus. I've looked in the .hg/attic directory and I can see the changes stored there so I know that its not that they don't exist.


Answers:
author: Seth
body: In the left panel of your repository, (not counting bookmarks, if you're on windows), you should see expandable lists for "File Status", "Branches", "Tags", "Remotes", and "Stashes" ("Shelves"). Some of the terminology may be slightly different, because I use Git, not Mercurial.

You should be able to expand Shelves, and right click a shelf to apply/delete.

comments: author: Chris Venus
body: Ah yes. I can see it now. I'd totally missed that thing (it was collapsed by default so didn't really impinge on my vision). Thanks very much! As it is I have mannually redone things for now but it will be massively useful for the future. :)


author: Johannes Kilian
body: How did you do the shelving?

I cannot speak for mercurial but for git only - I think the procedure is called "stashing" in git

* Select the modified files you want to be shelved (stashed)
* Press the **"Stash**" button in the toolbar. You will be asked for a symbolic name for the stash/shelve
* All the selected modified files will be put into the stash with the given name
* You'll see the stash in sourcetree's view, were tags and branches are located ("Stashes")
* Switch to your desired branch
* Right click on your stash
* "**Apply Stash**" ....
* .... and you are done. After successful applying the stash you might want to remove it ...

Using Sourcetree 1.3.3 on Windows.

Hope that helps

comments: author: Johannes Kilian
body: Wrote the answer simultanously ... :-)


author: Chris Venus
body: That is very helpful but sadly just a bit slower than Seth. I did indeed stash as you suggested but hadn't really understood how it worked so was just expecting a similar "unstash" button somewhere to click on. What you say makes perfect sense now and will make me more efficient with sourcetree now. :)


author: Chris Venus
body: I figured. I'm on stackoverflow a lot where this looks like it comes from and am very used to the whole simultaneous answers thing. ;-)


author: Linh Vanngo
body: For newbies, there is a Hide/Show option when you mouseover each category, e.g.BRANCHES, BOOKMARKS, ..., SHELVED. You may need to hide some other list and show the desired list.

comments: author: J.D. Grimes
body: If you don't see the hide/show options, try expanding the sidebar to make it wider. These links are apparently only shown if there is room.


Tags: bitbucket
How to amend the contents of a commit in sourcetree's interactive rebase?
Asked by Joseph Heenan:

When I start an interactive rebase in sourctree, there's an option 'Amend commit?'.

I was expecting ticking this option would put me into something similar to git gui's "amend last commit" feature - I'd see what was staged, what wasn't staged, unstage hunks/lines, etc.

What actually happens is that I just get shoved into a state where I'm not sure what the state actually is. It definitely thinks it's in a rebase, but there's no files shown in the staged area of the working copy.

How do I remove a hunk from the commit that I didn't mean to commit?


Answers:
author: KieranA
body: Hey Joseph,

The amend feature in interactive rebase allows you to drop in on any commit and make any changes, thus creating a new commit. So out of 10 commits, the 5th commit has something in it I'd like to change, so I hit amend on that one which will drop me back out to SourceTree still in a rebase mode. I can make changes and then hit commit.

At the moment SourceTree forces the 'Amend commit' checkbox in the commit sheet. This will cause the rebase process to continue once you've amended the commit you chose.

Feel free to ask more questions if you have any - we've been planning on writing a guide to this for some time.

Cheers

comments: author: Joseph Heenan
body: Thanks Kieran! At least from the perspective of someone coming from git gui, I have to say that I find sourcetree's amend commit view confusing. I'd feel far happier if the commit window showed me the final state the amended commit will end up in, whereas I believe it's showing me the changes that will be applied to the commit, if that makes sense.


author: anil kumar
body: Hi May I Know how can we apply git commit --amend on 5th commited one

Actually, I able to apply $git commit --amend -m "my msg" Which effects on latest commit.

Can You tell/suggest if it possible to apply on amend on any committed message out of 10 other than latest..

Thanks in advance

Anil


author: Ananth SNC
body: BRANCHES \> Right Click on commit on top right table \> Rebase children interactively \> Edit Message .. on Mac


Tags: rebase
Sourcetree Installation
Asked by Prakhar Paharia:

Hi,

I am unable to install sourcetree since i do not have access to install .NetFramework 4.5. I currently have .NetFramework 4.0 Extended.

Please help me in installing sourcetree.


Answers:
author: Prakhar Paharia
body: I am able to install .NetFramework 4.5 which allowed to install sourcetree. Issue resolved.


author: Prakhar Paharia
body: Thanks for responding.... I have admin rights on my machine. but upgrading .Net Framework to 4.5 is not allowed at present....current .NetFramework 4.0 is the approved version which got installed as part of my laptop setup. I have rights to install sourcetree or any other software but since it depends on .NetFramework 4.5 , I am unable to proceed.

is there any version of sourcetree that doesn't depend on .NetFramework 4.5? or any other way to install sourcetree by skipping the dependency on .NetFramework 4.5?


author: Seth
body: The .Net Framework is publicly available, I don't understand how you don't have access to it:

[](http://www.microsoft.com/en-us/download/details.aspx?id=40779)<http://www.microsoft.com/en-us/download/details.aspx?id=40779>

If you mean that you aren't allowed to install it (no admin permissions), you'll probably be unable to install SourceTree, even with .Net 4.5.
Cannot import licence file for Sourcetree on Mac.
Asked by Gary Frank:

Hi,

I registered Sourcetree and downloaded the licence file. However, when I try to import it inot Sourcetree, I get the message that the file, sourcetree.license.html, is not a valid licence file.

Any ideas?

Thanks,

Gary


Answers:
author: KieranA
body: Hi Gary,

This has been reported as a known issue with our internal sys admins. In the meantime you can get your license by just going to the SourceTree menu and hitting "Register" where you can login to your [my.atlassian.com](http://my.atlassian.com)account which will automatically download your SourceTree license.

Cheers

comments: author: Gary Frank
body: Hi Kieran,

Your answer is not an answer. I arrived at the problem by registering and downloading the licence file. This is done already. Why would you ask me to do it a again? If you don't have a proper answer, just say so. Is there an estimation on when the problem will be fixed? As you can see, I am not the only person too have this problem. The site states that my licence is good untll February.

Regards,

Gary


author: KieranA
body: Hi Gary,

My answer explains what you need to do, although I could reword it for you. If you go into SourceTree and click on "Register" (either through the File menu on Windows or the SourceTree menu on Mac) then login to your [my.atlassian.com](http://my.atlassian.com)account in there then it will automatically download your SourceTree license. The download you had was incorrect as there was a problem on [my.atlassian.com](http://my.atlassian.com)which has since been resolved.

If you use either method again now it should work.

Cheers


author: Gary Frank
body: Hi Kieran,

You have to admit, that you didn't actually say that the problem was fixed. Thanks, I appreciate your help on this.

Regards,

Gary


author: KieranA
body: Hi Gary,

That's because the problem wasn't fixed when I answered your question initially. As a result of this thread (and others) the IT team raised the priority and made a quick turnaround, so I appreciate you taking your time asking on here as it does help raise priorities and fix the issue for everyone else experiencing the same problem.

Thanks again :)


author: Shiran Pasternak
body: Have the same issue. Loaded a proper license (called "sourcetree.license.html") but SourceTree does not recognize it.


Tags: licence
Change default repo location
Asked by James Carroll:

Whenever I clone a repo from BitBucket to my local system, Sourcetree assumes that I want to store the local copy to my "home" directory( c:\\users\\\<my name\>\\Documents\\\<repo_name\>). That's not where I have all my git repos, so I have to navigate to where I want it to be stored. This creates two frustrations:

1. I can't figure out how to change the default location so that I don't have to navigate at all.

2. Once I'm done navigating Sourcetree has "forgets" the repo name so I have to add it back in.

Is there a way to set the default folder in SourceTree so that I'm not as frustrated?


Answers:
author: Seth
body: Have you tried setting the "Project Folder" in Tools \> Options \> General \> Misc? I don't know if that is what that option sets, but it seems like it might.

comments: author: James Carroll
body: That was it! Thanks!


author: ?ukasz Augustyniak
body: Thanks! Works for me too :)


author: JC
body: Thank you!


author: Lucy
body: Note that for macs this setting is under SourceTree \> Preferences \> Misc section but is still called "Project Folder"


author: jmccleery
body: Exactly what I was looking for!


author: Joaquim Barrera
body: OMG so obvious... :smile:


author: scottgoddard
body: I completely missed this also, despite many looks! Thanks :smile:


author: amitkdr
body: **So what does one do if one's work-laptop is tiny and the misc folder is below the fold and there's no scroll bar on that option window? I can't get to that option and can't pretend to have a higher resolution!**


author: Sunny Howe
body: Works for me Too - so amazing which I would known this long ago


author: Tornike Gelashvili
body: In a new version of sourcetree (v2) the setting is called "Project folder:" and it's located under Tools \> Options \> General \> Repo Settings.

comments: author: vsshs
body: Thanks!


author: Jeramy S
body: This is still accurate in V 3.3.6 (Jan 2020).


author: Moeez_Ahmed
body: Thank you. This information helped me.


author: titiman
body: Thank you. Confirmed the same for v 3.4.2 on Windows as of April 2021.


author: pradeepradyumna
body: In the year**2021,** Source Tree **Version 3.4.4 for Windows**. you can find it under

**Tools -\> Options -\> General -\> Repos Settings**   

![SourceTree.png](https://community.atlassian.com/t5/image/serverpage/image-id/145239iE70C6F369554576C/image-size/large?v=v2&px=999 "SourceTree.png")


author: Project Manager
body: I am unable to modify this using the BitBucket GUI for macOS (version 4.0.1).

There is no button available to choose a different default directory...

Does anybody know how to modify this using command line?

![bb-mac-prefs.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/80750i481480358D44090F/image-size/large?v=v2&px=999 "bb-mac-prefs.jpg")


Tags: configuration

default
Initial download of Mercurial repo on bitbucket shows *every* file changed
Asked by oompaloompadiapers:

When I try to clone this repo from a clean state:

[](https://bitbucket.org/gregsdennis/manatee.trello/)<https://bitbucket.org/gregsdennis/manatee.trello/>

SourceTree (Windows) is showing \*every\* file as edited, and \*every\* line of the files as new. In the screenshot, I've highlighted a particularly short file so that it'd be easy to see how each line is touched except the last.

I'm guessing that's a line-ending thing (?), which I wouldn't necessarily expect to happen, but I'm also unable to shelf "my changes"; there's no change after "shelving".

Haven't had this problem in the past with git repos.

Is there a Mercurial-specific setting for line-endings I've set incorrectly? Even so, why wouldn't I be able to shelf my "changes"?

Thanks.

![bug](http://rufwork.com/images/bugs/sourcetree20140120.png)


Answers:
author: Seth
body: As step 1 to make sure line endings are the problem, check that "ignore whitespace" box above the diff. Your files will still be shown as modified on the right, but the diff should be empty if changes are white-space only.

Then check out this post on stack overflow: <http://stackoverflow.com/questions/10802918/converting-mercurial-unix-line-endings-to-windows>

comments: author: oompaloompadiapers
body: EDIT: Sorry -- I should have mentioned that checking "Ignore Whitespace" does return nothing in the text area, so that is the difference.

Should Mercurial have downloaded the files and changed the line endings? That is, I would've expected the line endings to stay the same as in the repo on initial download. The screenshot shows \*the initial state\* after a clean pull for me. That seems like a bug, unless I'm missing a setting somewhere.

Similarly, I would've expected a Shelf to fix it.

Thanks!


Tags: windows
How to change an Hg repositoty to Git in SourceTree?
Asked by Kouichi C. Nakamura:

I'm very new to SourceTree and Git/Hg, and I'm stuck at the very beggining of everything.

I wanted to track the versions of a website under construction.

So I added the folder containing codes to SourceTree Bookmarks.

Although I wanted to use Git, I accidentally chose Mercurial instead.

After that, I tried to change it to Git, but I couldn't; I deleted the bookmark and repeated the addition and this time it was automatically set to Hg.

Is it difficult to set it back to Git? If it's doable even for a beginner, could somebody tell me how?


Answers:
author: Seth
body: You'll want to re-remove the repository from sourcetree. Navigate to the location in Explorer/Finder, and delete the .hg folder (may be hidden). Now you should be able to add the project to sourcetree with the option of which type of repository to use.

Keep in mind that you should not delete this directory on anything but a new repository because you will lose your entire history and all previous versions.


author: Kouichi C. Nakamura
body: Cheers! This is very helpul.


author: Kouichi C. Nakamura
body: Thanks a lot! It worked well. Now I've got an idea of what .hg and .git files are.

comments: author: Seth
body: Once you've actually done some commits, those directories hold not only the config for your repository, but also the contents of all the previous commits as well, so think twice about deleting the directory for an existing project.
SourceTree hangs periodically on Mac
Asked by farrell_edwards:

SourceTree hangs periodically for me. Sometimes when pushing to remote. Sometimes when committing local. Sometimes when staging files for commit. Once it even hung when I was clicking on a file to see a diff. It is an indefinite hang and requires a force-quit.

I am more and more troubled, worried that it's going to screw up my local or remote repo. Anyone else seeing this?

SourceTree v1.8.0.3

git v1.8.4.2

MacOS v10.8.4


Answers:
author: Josh Sutterfield
body: I suggest looking to see if you have an instance of FileMerge open, or maybe some other diff tool. If so, CMD-Q it and see if that ends the hang. That was my problem. The hang doesn't happen right away but once I do a diff, if I come back to SourceTree it's always blocked until I kill the diff application (closing the diff window isn't sufficient).


author: Josh Sutterfield
body: This happened very for me as well but I just realized the last time was because I had done an External Diff! On repeated retries I see the pattern:

1. SourceTree doesn't immediately hang but does within 5 seconds or so
2. SourceTree continues to hang while FileMerge is running, even if I close the diff window
3. SourceTree *resumes* once I *fully quit FileMerge*.


author: Lorne Kelly
body: Happened for me on very first use - going back to command line


author: Julian B
body: My SourceTree does the same.. at least one time a day when I go back to it.


author: KieranA
body: Hey Farrell,

Could you open up a ticket on [jira.atlassian.com](http://jira.atlassian.com)and provide as much detail as possible? We can then track it from here as anything in JIRA is what the developers look at.

Cheers

comments: author: farrell_edwards
body: Issue created. <https://jira.atlassian.com/browse/SRCTREE-2068>


author: Sam Kalat
body: I have some information about this issue that I would really like to provide, including a hang report. However I can't get to this JIRA issue when I'm logged in, and I can't comment on it when I'm logged out. (I get "An error occurred while attempting to fulfill your request." when logged in.)

That in itself seems to be an unresolved problem?

[](/questions/185800/error-when-updating-profile-using-atlassian-id)<https://answers.atlassian.com/questions/185800/error-when-updating-profile-using-atlassian-id>

[](/questions/274655/how-do-i-get-atlassian-id-to-work-for-jira-atlassian-com)<https://answers.atlassian.com/questions/274655/how-do-i-get-atlassian-id-to-work-for-jira-atlassian-com>

I'm not sure how to open a bug for being unable to open (or edit) a bug, so I'm at a loss for where to comment about the SourceTree hang.


author: Jeff Thomas
body: I've seen the same issue, but haven't been able to track down a solution. I've only experienced it when coming back to SourceTree and trying to interact with the application, I then need to force quit and it's good to go for a while.