youngmon/atlassian-qna huggingface dataset:
SSH drive forced unmounting while updating in sourcetree
Asked by Matt Bulfair:

I am currently using source tree for my mercurial repos, I store the repo's on a local server for multiple people. I used to use SMB share but ran into random issues when pushing/pulling. Did some research and found that SSH tunneling was the best solution for this.

Recently it seems when I do a update to a branch, it will sometimes, eject my drive. For mounting I have used transmit, and now expandrive, both with the same result.

Is this a issue with SSH, Sourcetree, or the server it self?

Any help would be appreciated.


Answers:
author: stevestreeting
body: Yeah an SMB share is not very reliable for use with Git or Mercurial. What do you mean by 'SSH tunnelling' though? Do you mean running the SMB protocol over SSH? If you're using SSH, why not just use SSH push/pull directly instead with a SSH URL? That's how I set up all my hg repos.

I don't know specifically about ejecting the drive, my guess would be that the tunnelling via SSH/SMB is a bit fragile. If it were me I'd just use a SSH URL directly (no SMB) for the hg remote - you can always use SMB separately for simple file access.

comments: author: Matt Bulfair
body: My apologies, I am using expandrive to SFTP: into my local server, which is where I mount as a drive. I then clone, push, pull, and commit from source tree, but it goes through that SFTP method. So what you are saying is to change my remote url to ssh username@ipaddress ?


author: stevestreeting
body: Yes, so the format for the remote URL will be something like: [ssh://yourname@host:/path/to/repository](ssh://yourname@host/path/to/repository) - you don't need anything else except the SSH server running.
about config file
Asked by jawa tang:

Hello, everyone, I encountered a problem.Is about my configuration problem.I knew then /path/to/project/.hg/.hgrc file is used to configure my the extension, but I think whether there is a global configuration file, so do not need each item to configure. (\~/.hgrc file I tried seems to not work, who can help me?


Answers:
author: stevestreeting
body: You can edit the \~/.hgrc file, but for safety SourceTree actually disables custom extensions that you may have enabled in your global configuration, in order to be able to guarantee stability. If you want to allow custom extensions to run inside SourceTree, simply include them in your global \~/.hgrc and then go to Preferences \> Mercurial, and check the box next to the extension in the list at the bottom. Close the Preferences, and then the extension will be enabled in SourceTree too.

Obviously enabling custom extensions is entirely at your own risk! :)
Problems with Sourcetree: resolve conflicts using external tool (Filemerge/opendiff)
Asked by Tim Duckett:

I'm having problems getting SourceTree to launch Filemerge from either of the two menu options.

I see the "visual merge" dialogue box appear, and BACKUP, BASE and REMOTE files appear in the working tree. Then after about 5 seconds the dialogue box closes itself, but Filemerge doesn't launch.

Clicking the "External diff" button at top right does launch Filemerge - with 'null - /dev' in the left-hand pane, and the conflicted file in the right.

My Xcode path is /Applications/Xcode.app/Contents/Developer. Running opendiff at the command line works with no problem.

I've tried setting the preferences settings as both 'FileMerge' (with no diff command, and empty arguments) and as 'Other' with the diff command as 'opendiff' and arguments as $LOCAL $REMOTE -merge $MERGED (as per [http://www.soycow.org/meep/?p=1170](http://www.soycow.org/meep/?p=1170.).

(Edited to add: this is the content of my global .gitconfig:

\[diff\]

tool = default-difftool

\[difftool "sourcetree"\]

cmd = opendiff \\"$LOCAL\\" \\"$REMOTE\\"

path =

\[mergetool "sourcetree"\]

cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \\"$LOCAL\\" \\"$REMOTE\\" -ancestor \\"$BASE\\" -merge \\$

trustExitCode = true

Does anyone have any ideas?  
Thanks


Answers:
author: GarethJ
body: The fix is yet to arrove but there's a workaround at <https://jira.atlassian.com/browse/SRCTREE-2211>


author: adam0101
body: I noticed that SourceTree will hang if one of the files to diff had been removed. I submitted a [bug](https://jira.atlassian.com/browse/SRCTREEWIN-5770) regarding this. Check to see if this is your case.


author: lawrencebautista
body: I get the same problem with opendiff on mac osx 10.10. Command line works fine. Source tree does not. Please fix!

Also note that sourcetree creates backup files upon clicking "launch external merge tool", but does not launch the merge tool!


author: TsurHerman
body: Same problem as described above with tortoisemerge and with kdiff3


author: Eric Lau
body: I am seeing this issue as well as Bennett Smith. Even changing the tool back to default / non-external tool does not have any effect. Help!!!

BTW, I am using Windows version, and use beyond compare as external diff tool. The suggested link above does not help.


author: Bennett Smith
body: I am seeing the exact same issue, but my external diff/merge tool is Araxis Merge. Everything was working fine through multiple individual 3-way merges. Then, without any reason I can see, Sourcetree started acting as described above. It creates the merge files in the folder, a dialog flashes up (but goes away too quickly to read) and nothing else happens.

Does anyone have an aswer for this? It is very frustrating.


author: stevestreeting
body: Maybe this helps? <https://confluence.atlassian.com/pages/viewpage.action?pageId=267258218>
Sourcetree: How can I see my tags description ?
Asked by Oleg Detinin:

Hello:

Repo is Git.

I created several annotated tags with decsriptions ('message' field in 'create tag' dialog). How can I view those descriptions later ? I am not able to find any UI command which does it.

Thanks.


Answers:
author: stevestreeting
body: This is currently an outstanding improvement request: <https://jira.atlassian.com/browse/SRCTREE-987>


Tags: git
SourceTree Hosted Repositories for github for the enterprise?
Asked by entropyworks:

I would like to use SourceTree with <https://enterprise.github.com/> installed on my own server. Is there a way to add that to Hosted Repositories?


Answers:
author: Gabor Maghera
body: I will welcome this feature, too.


author: Nick Kirkes
body: Any update on this? Would be a great feature!


author: stevestreeting
body: Not right now, sorry. In future I'd like to add more pluggable options here.
Sourcetree: View file content from selected commit
Asked by Oleg Detinin:

Repo is git.

I'm completely lost. This should be straight forward, but I am not able to find it. How can I view a file content from selected commit ?

1. If I choose Open(Shift+Command+O) its open a cheked out file, not a file from the selected commit

2. If I choose "Quick View" -- it does a trick, but I can not select text from QuickView window, plus QuickView dows not open text files with my custom extension. So this is not an option.

3. I can see a file content in a Blame view, but again, I can not select any text from there. Plus the purpose of this view is different.

Is it a way to see a file content in the same part of the window where the diff information is currently displayed ?

Thanks,

Oleg


Answers:
author: stevestreeting
body: You can do this two ways:

1. Quick Look - even though you can't select the contents of the Quick Look panel, you can click the 'Open With \<App\>' button at the top-right to get the fully editable version
2. If that isn't possible, you can use the 'External Diff' option in the diff window which will always give you the full contents on both sides of the diff in the tool you've chosen.

comments: author: Oleg Detinin
body: Thanks, Steve.

Is it possible to improve this functionality ? There are many ways to make it better. Like:

- Adding another button netxt to diff, to open selected file in external app

- Having an option to open it in place instead of diff output

- Some keyboard shortcut

- something else

Oleg


author: farmerpaul
body: I agree; I was getting frustrated that there was no convenient way to copy \& paste from the Quick Look window (though I guess I'm more frustrated with Apple because of that :P). Thank you Steve for the tips, that works great!


author: Nacho Caballero
body: For anyone looking for a better answer: right click on the file name \| log Selected \| right click on the commit \| Open selected version

comments: author: Chris Lanning
body: I was looking for something like 'View Log'. Log Selected sounds like it is going to perform an action. Thank you for this, it is just what I was looking for!


author: DHSV
body: I have a problem with this; the file will only ever open in Chrome. It's a .html file, and I'd prefer my Mac's default be Chrome, but I need to open this version of the file in a text editor without having to checkout the file.


Tags: git
Weird invisible directory is messing up my disk
Asked by Lance Boyle:

I day or two ago I tried to use SourceTree to clone the LyX repository. The result was a very long period of downloading which I estimate was 2-3 GB, but only about 160 MB appeared in an invisible file in the target directory. (The command displayed in a SoureTree window had no meaning to me--it was nothing like git clone...) I have no idea where the other downloaded stuff went--I could not find it on my disk even though the total disk usage indicated that several GB more were being used than right before the attempted cloning started. I deleted the target folder and downloaded the repository using command line tools. I'm on OS X 10.7.4, Lion.

So...

Today's regular backup, the first since the SourceTree experience, failed. The reason given by the backup program is due to a file

/.MobileBackups/Computer/2012-06-04-000732/Volume/Users/me/.Trash/git/.git/objects/pack/pack-94fb8ba1ddb93ddc40214903c6163081188f04f0.pack

By sudo su I was able to verify that this file (and one other in the same directory) indeed exists. The problem reported by the backup program is "No space left on device," meaning the target disk for the backup.

I believe that as long as these files and indeed this bizarre directory MobileBackups exists, all my future attempts to back up will fail.

Is this in fact a SourceTree artifact?

How can i get rid of it?

Thanks,

Jerry


Answers:
author: stevestreeting
body: The .MobileBackups folder isn't anything to do with SourceTree, it's a Time Machine folder. You can find more details about this folder here: [https://discussions.apple.com/thread/3701356?start=0\&tstart=0](https://discussions.apple.com/thread/3701356?start=0&tstart=0) what's probably happened is that whatever you were cloning was big enough to push you over the edge in terms of disk space. From the path, it looks like you deleted what you partially cloned, but it was still sitting in your Trash and Time Machine is taking a snapshot of it. Emptying your Trash might help as a quick fix. Alternatively you can tell Time Machine not to do these mobile backups, like this: <http://wiki.summercode.com/how_to_disable_mobile_backups_on_lion>

FYI the command issued by SourceTree would in fact have been a 'git clone' (or 'hg clone' for Mercurial), but there were probably a bunch of global options in the command line in between the 'git' and the 'clone' which might have made you think it wasn't.

comments: author: Lance Boyle
body: Thanks, Steve. That's very helpful. I moved to Lion only recently and am still finding new things.

My destination backup volume is not nearly full so if the problem persists I'll take it up with the developer of the backup program.

I just re-checked the git command that SourceTree issued and of course it is a clone command as you said. I see --recursive in it so I suppose that is why I got more than I wanted. (I still don't know where it went, but I believe it is gone.)

BTW SourceTree does look awesome.

Thanks,

Jerry
Using git-svn in SourceTree: Status of a merged local branch to a remote one
Asked by Jan Philipp:

Overview: This question relates to a git-svn repository.

Situation:

1. I have a checkout of trunk (\~= master).
2. I create a new local branch based on the master.
3. I make some commits (at least one) on the new branch.
4. I switch back to the master.

If I merge the local branch into to current one (the master, which is linked to the remote trunk), this will be possible (at least if the svn remotes are up to date, of course). git's status of the merge will be displayed like we expected. But after pushing the new commits to the remotes (the svn), the merge (visible) status will be removed. As a matter of fact, the local branch ends in its own lifeline and isn't be merged in the master anymore. Additionally, all (merged) commits are displayed a second time (in the master).

This was totally "funny" after merging a bunch of commits of trunk into two other branches. Every commit was shown three times.. ,)

My questions are:

1. Is this a limitation of git-svn beause after pushing/pulling/rebasing the commits/references are lost?
2. Is this a bug of SourceTree?
3. Did I get it wrong?


Answers:
author: stevestreeting
body: Because Subversion's merge features are very primitive, you should never use git merge into a branch that you intend to push to svn. It's fine to use branching and merging on other branches that are local only (or only pushed to a git remote), but when you want to push commits to svn, you should either rebase or cherry-pick the commits into the branch which is being pushed up to svn. This is a limitation of git-svn (although only because of the way svn works).

The SourceTree Help actually suggests not doing any merges at all in a git-svn repo (that's the simplest rule to understand!) but as I say, using other branches that are local only or pushed to a git remote is actually OK, so long as you only move commits on to the svn tracking branch via linear operations and not merges.
Diff for Latin1-encoded files
Asked by Christian Lindig:

I'm using both Latin1 and UTF8 encoded files in my projects. The browser showing diffs seems always to assume the UTF8 encoding, resulting in incorrectly showing non-ascii characters. Is there a way to tell SourceTree (or Git) about the encoding of a file?

Addendum: picking an encoding on a per-project basis would be sufficient rather than on a per-file basis. The reason I'm using Latin1 in some projects is that these are legal documents that I share with non-developers on Windows machines that seem to prefer it.


Answers:
author: stevestreeting
body: Actually, I take it back, there is a way to do this. You can create a .gitattributes file for the folder/pattern and define the 'encoding' setting there. This should be picked up by SourceTree in the diffs too. <http://schacon.github.com/git/gitattributes.html>


author: stevestreeting
body: No. There's no practical reason to be using Latin1 encoding in 2012. While you can change the encoding in git, doing it on a per-file basis is very impractical. You'll save ourself far more pain just by standardising on UTF.


Tags: encoding
Sourcetree: How can I compare (diff) files from arbitrary commits ?
Asked by Oleg Detinin:

Repo is git.

Can not find this option. I see the option to compare file with its parent, but how can I compare any given file with a file from a selected commit ?


Answers:
author: stevestreeting
body: Just select 2 commits in the log at once using Cmd-Click, then you'll see the complete diff between those two commits.

If you want to filter things down further you can right-click on a file, click 'Log Selected' to get the history just for that file, and then again multi-select commits in that window.

comments: author: Oleg Detinin
body: Thank you very much !


author: Lin Luo
body: Follow-up question: how to use ExternalDiff to view the diff as provided in the above approach?


author: Bronius Motekaitis
body: @Lin Luo I can still see External Diff on one file at a time in the arbitrary diffs view. Click on one file within the composite diff, and cmd-click \> External Diff as always.


author: amalo1985
body: Follow-up question: Selecting two commit in the log at once work correct, but it occurs often that the selected commit are lost while viewing the diff (it returns to the uncommited changes).Would there be a way to open a new windows with the diff of the selected two commits? Thanks!


author: Daniel Luevano
body: How can I do this on windows? I want to see the differences between two commits on all files involved.


author: mdolnik
body: You can press Ctrl-D

Refer to <https://jira.atlassian.com/browse/SRCTREEWIN-7569>


author: Pan Shanshan
body: Thank you very mach.


Tags: git
View the history of a single file
Asked by Doug Wood:

HI, is there a way to just click on a file and view the history of all versions of that file ? for a mercurial repo, fyi.

Thanks!


Answers:
author: Doug Wood
body: this is for SourceTree on a Mac


author: Dan renaud
body: I have the same problem. I'm using SourceTree for Mac. This is a REALLY important feature.

Cheers,

Dan


author: David at David Simpson Apps
body: Which product are you using?


Tags: history
Chinese Localization
Asked by Yuxio Tzeng:

I like source tree, it's my daily-use app.

Can I help translate SourceTree to chinese?


Answers:
author: stevestreeting
body: Thanks for the offer! I've already passed the base translation files to another chinese user, that was a few weeks ago now. If you'd like to also take a look, you can find the base strings files here: <http://downloads.atlassian.com/software/sourcetree/SourceTree_translation_base_1.4.zip>

I'm glad to hear you like SourceTree! :)
how to push and pull updates between repositories on the local network?
Asked by Martin Jewiss:

Hi - this question really shows up my noob status with source control, apoligies if it's been asked and answered before.

I have 2 macs, one laptop and one desktop. Both have SourceTree installed. I've created a Mercurial repo on the laptop to manage an existing project. Then created a matching repo in BitBucket and can push changes to it fine.

I've just cloned the laptop repo to my desktop, which worked fine and I've set up remote access to the same BitBucket project. Push and Pull between the BitBucket repo and the desktop also work fine.

The part I'm having trouble understanding is how to configure the repos in SourceTree so that I can pull changes on the desktop repo directly into the laptop repo likewise, how to pull changes in the laptop repo directly into the desktop repo.

Maybe I'm missing something fundamental here and it's not possible? Any help most appreciated.


Answers:
author: stevestreeting
body: You can create additional remotes on each machine pointing at the other as a way to sync directly, click on Settings in the top-right of the repo window and click Add. What URL you use to access the other machine depends on what transport you want to use; if the remote machine is available over a file share then you could use file://volume/path/to/repo, otherwise you'll have to set up a server of some kind on the remote machine in order to expose it. Options for that include running 'hg serve' temporarily on the other machine, or possibly setting up an ssh server - for more information, take a look at <http://mercurial.selenic.com/wiki/PublishingRepositories>

HTH

comments: author: Martin Jewiss
body: Thanks for the reply Steve, all sorted using /Volume/path/to/repo.

I was confused by the fact that when creating a new repo from the Bookmarks window, Source Path/URL has GUI buttons for both remote and local souces. The window that opens with Settings \> Remote \> Add only has a URL button in the GUI.

All working fine now that I know to type the path in manually. Thanks!
Git: Non contiguous selection when staging selected lines
Asked by Oleg Detinin:

In Sourcetree (git repository) I'm not able to stage non contiguous lines.

![](../../upfiles/Screen_Shot_2012-05-30_at_14.13.18_.png)Is it a git limitation or SourceTree ?

Thanks,

Oleg


Answers:
author: MikeL
body: You should use smartGit for that. It has an Index Editor which lets you freely edit the index and working tree contents of files.

comments: author: Oleg Detinin
body: Thanks, Mike.


author: stevestreeting
body: It's a SourceTree limitation, SourceTree needs to build a patch file in order to manipulate the diff on a line level, and non-contiguous line selections make that a lot less reliable. Instead of selecting 2 non-contiguous areas of the file though you can just select a single area at a time and stage that instead.

comments: author: Oleg Detinin
body: Thanks for explanation and workaround. Any plans for improvement ?


Tags: git
How to clone in Sourcetree??
Asked by Klaus Waiss:

I can't figure out how to clone a project from git in sourcetree on Mac OS X Lion.

A simple terminal command like: git clone <https://github.com/facebook/facebook-android-sdk/>

Can't find a toolbar-Button or anything to clone in SourceTree, so I had to fall back to shitty terminal :-(

Is this so difficult to add basic commands that are visible to users to make life easier - a simple toolbar button to clone? Basic functionality...either missing or impossible to find... idk

Please help me if this functionality is in SourceTree and where to find it. Thank you :-)

regards

<br />


Answers:
author: stevestreeting
body: Two other options in addition to this:

1. You can drag \& drop a URL from the browser either onto the dock icon, or into a specific location in the Bookmarks window.
2. You can configure your GitHub account in SourceTree's Hosted Projects (View \> Show Hosted Repositories) and pick any projects you own or follow on GitHub (or Bitbucket, Stash and Kiln).


author: MikeL
body: On the first occuring window ("Bookmarks") select the left most toolbar button. Or use Cmd+N (aka File \> New).
How to disable spelling "correction" in SourceTree commit messages
Asked by Scott Cole:

I turned off "Correct Spelling Automatically" in System Preferences, and still SourceTree changes what I write in my git commit messages, often so that they no longer make sense. Is there a way to disable this?


Answers:
author: stevestreeting
body: In Lion this is no longer a system-wide option. Right-click on the commit text area, select Spelling and Grammar, and alter the Check / Correct options as appropriate. SourceTree 1.4 onwards remembers these settings and they're remembered independently of any other application.

comments: author: AlecRust
body: Fantastic. Is the idea each application will remember its own preference for this?


author: neoneye
body: Argh Apple autocomplete annoys me in SourceTree. Just the moment I hit commit it autocompletes "json" to "son".

Please add this to preferences.

comments: author: Ricardo Pietrobon
body: completely agree, so annoying


author: Maxence Cornet
body: +1 it's driving me crasy


author: Syrus Mesdaghi
body: This is very annoying. especially since it wasn't clearly reachable in the preferences. It has made us have more incorrect comments than we used to have without this feature! it is easy to know when someone has a typo but changing 'wps' to 'was', or 'gameclock' to 'game cock' actually causes more confusion for most people.

comments: author: shapiromatron
body: Agreed. Preferences is the first place I checked for this, then I had to do a google search to find this answer.


author: Bob Swift (personal)
body: And it would be nice to just have a SourceTree only option to turn this off.