youngmon/atlassian-qna huggingface dataset:
How to change folder path of existing bookmark all at once?
Asked by Sean Lee:

My SourceTree is on OSX 10.8.3

I like to move existing project folders somewhere else, but there seems to be no easy way to change the folder path on existing bookmarks. The project folder under SourceTree preferences is merely for future new addition. For existing ones, I have to change it one by one.

Anyone knows how to change the folder path on existing bookmarks all at once?


Answers:
author: KieranA
body: Hi Sean,

You'd have to modify the browser.plist file for SourceTree. I'd be very careful modifying this file though as if it's corrupt then SourceTree will have a hard time reading it. I recommend backing up this file first. It's located in /Users/\<user\>/Library/Application Support/SourceTree. Strangely, TextMate can't seem to read a plist file on my system, but TextWrangler managed it fine as it's just an XML file.

**Step 1**: Within this XML file you'll see your repository name immediately followed by the path to the repository. So, and I'm sure you guessed it, you can just do a find/replace. A caveat is that you could still wreck other repositories if your find/replace isn't specific enough. Using my repositories as example, if I suddenly decided to move everything up a level I'd do a replace on "/Users/Kieran/Documents/Development/" and change it to "/Users/Kieran/Documents/".

**Step 2**: Now you need to move your actual repository folders, "mv" doesn't allow wildcards in either operands so you'll need to use a loop for this, and you'll also only want to list directories. So you'd need something along the lines of:

```
#!/bin/bashfor folder in `find . -type d -maxdepth 1 -not -name .` ; do	mv -v $folder &lt;wherever&gt;done
```

Basically test the mv command so your folders go to the right place. Hopefully that should get the ball rolling for you.

Cheers


author: David Jameson
body: I need to modify that file too because I had to change the name of the underlying hard drive where everything is saved.

However on my system, that file (browser.plist) looks like it's binary, it's certainly not XML.

I tried using a PList Editor but it just told me the file was corrupted.
MacOS git flow repo not enabled
Asked by scottsue:

Hi,

In attempt to create a new git flow Feature branch in sourcetree, I get the following error 'fatal: Not a gitflow-enabled repo yet. Please run "git flow init" first.'

I am using the embedded Git (version 1.7.11.1). How do I run "git flow init" via the embedded version of Git?

If it helps, here is my .git/config

```
[core]        repositoryformatversion = 0        filemode = true        bare = false        logallrefupdates = true        ignorecase = true[remote "origin"]        fetch = +refs/heads/*:refs/remotes/origin/*        url = http://XXXX.git[gitflow "branch"]        master = master        develop = develop[gitflow "prefix"]        feature = feature/        release = release/        hotfix = hotfix/        support = support/        versiontag = [branch "develop"]        remote = origin        merge = refs/heads/develop
```


Answers:
author: scottsue
body: I have worked this out now.

The problem was that I had removed the master branch from my local repository, so git flow was presumably looking for it. Upon not finding it, it thought git flow was not initialised.

It would have been good if it gave me a slightly less cryptic message though...

comments: author: KieranA
body: Yes git-flow does rely heavily on your branch names. This is very important. The error message you would've received wouldn't have been from us but would have been from git-flow itself. We can't predict what git-flow reports as this could change at any time.

Glad you've got it working


author: scottsue
body: Yes I'll put this one down to being a git newbie


author: pascalgagneur
body: I got this problem when my local master branch where missing.


Tags: git-flow

mac
Is there a fast way to open up repository link in browser from either Bookmarks or the Repo
Asked by jhgorse:

Subject is the message.

In the Github app for Mac, there are quick and convenient ways to open various links to the hosted web content surrounding the project.


Answers:
author: KieranA
body: Hi Joe,

GitHub can do this successfully because they only support GitHub repositories (from what I remember?). This way, the URL format is absolutely guaranteed. You're right, we could support this for Bitbucket or GitHub repositories, but anything else would be a guess in order to support all the different hosting providers.

I've added it [as a feature request here](https://jira.atlassian.com/browse/SRCTREE-1530) for you so we could possibly add it in the future.

Cheers!


Tags: github
Setting up custom merge tool in SourceTree
Asked by Andrew Eskridge:

I can't seem to find the correct variables needed to set up a new custom merge tool. Can anyone point me to a list of variables that SourceTree makes available to custom merge tool commands?

```
..\..\semanticmergetool.exe -s=src.cs -b=base.cs -d=dst.cs -r=semanticmergetoolresult.cs -emt="..\..\mergetool.exe -b=""@basefile"" -bn=""@basesymbolic"" -s=""@sourcefile"" -sn=""@sourcesymbolic"" -d=""@destinationfile"" -dn=""@destinationsymbolic"" -r=""@output"" -t=""@filetype"" -i=""@comparationmethod"" -e=""@fileencoding""" -edt="..\..\mergetool.exe  -s=""@sourcefile"" -sn=""@sourcesymbolic"" -d=""@destinationfile"" -dn=""@destinationsymbolic"" -t=""@filetype"" -i=""@comparationmethod"" -e=""@fileencoding"""
```

This is the command that I would execute on the commandline. The 4 variables I need from SourceTree are sourcefile, basefile, destinationfile and resultfile.


Answers:
author: KieranA
body: Hi Andrew,

The built-in SourceTree documents provide the help. Here's an extract:
> Here is where you set the external diff/merge tools. SourceTree has in-built support for FileMerge, DiffMerge, Araxis Merge, KDiff3 and more, but if you wish to use another tool you can select 'Other' and provide your own tool information.
>
> If you do choose to use 'Other', then you should supply the full path to the tool you wish to use in the 'Command' field, and the parameters that will be needed in the 'Arguments' field, with the following placeholders being available to supply file names:
>
> * $LOCAL - the name of the file on your local system
> * $REMOTE - the name of the file containing the other contents you're diffing or merging against
> * $BASE - in the case of a merge, the name of a file containing the common ancestor of $LOCAL and $REMOTE
> * $MERGED - the name of the file to save merge results to
>
> Obviously 'Diff' only needs the first two parameters. For merges, you should really pick a tool which supports 3-way merging to make your life easier (all of the tools that SourceTree supports out of the box are capable of 3-way merging).

Hope that helps

comments: author: KieranA
body: Ah, no, the Windows version is yet to have the documentation integrated :)


author: Andrew Eskridge
body: Thank you very much. That's exactly what I was looking for.

On another note, I still can't seem to find the documentation anywhere. That's where I first tried to look. Maybe the windows version doesn't have built-in documentation yet?


author: Danny Frencham
body: I found this question on Google, as I was looking for the configuration for Semantic Merge Tool with SourceTree.

In case anyone else needs it, the External Diff Command arguments are: -d $LOCAL -s $REMOTE

The External Merge Command arguments are: -d $LOCAL -s $REMOTE -b $BASE -r $MERGED

comments: author: Sonaten
body: I did the same thing. It took a second or two to realize that this was what I was looking for. I'm now running Semantic Merge with Source Tree, thanks to your answer.


Tags: custom-field

diff

merge

windows
How do I verify my files before pushing them.
Asked by noozoo:

I want to push, but I want to see what changes i have before I push. In gitbash, I just need to do this: git diff --stat origin/master.

Is there a way to do this in SourceTree? If not it seems like a major gap.


Answers:
author: stevestreeting
body: You can already do this in git, because the log supports diffing between 2 arbitrary points in time and the remote branch you're tracking is in the log.

Make sure that you have 'Show Remote Branches' enabled. Then, right-click the remote branch in the sidebar (origin \> master) and select 'Diff against current'. What this actually does is multi-select your local branch and the remote branch in the log, which shows the difference between them.

You can actually use Ctrl-Click to arbitrarily select any 2 commits and see the difference between them in the log, 'Diff against current' is just a short cut which is available for most entries in the sidebar.

comments: author: noozoo
body: I can't find where to enable "Show Remote Branches" but I must have it enabled, because this works. I had to choose which remote branch of course.

Thanks!

Just a note: I searched all the menus for this and the help, and was unable to find this. Maybe an opportunity to update the help files.


author: KieranA
body: Hi Michael,

There's already an open feature request for this [in JIRA here lined up for 1.6](https://jira.atlassian.com/browse/SRCTREE-494) which means you'll see it in SourceTree this year (assuming you're talking of the Mac version).

Hope that helps

comments: author: noozoo
body: What about on windows?
Difference in diif suppression between Windows and Mac SourceTree
Asked by Dave Parsons:

I have a file which is quite large 33K lines and 1.4MB on disk. I have increased the size of text files to diff in the options on both version of the application. Mac version will show me the diff output, but Windows one does not. Is this a bug or expected behaviour and can I change it on Windows to be the same as Mac.ThanksDave


Answers:
author: stevestreeting
body: The threshold at which the entire diff is suppressed (ie git diff is not even issued) operates the same way on both Mac and Windows. However on Windows there's an additional setting called 'Max Diff Line Count' which truncates the \*display\* of the diff beyond a certain point (default 500 lines). This is because we've discovered that WPF isn't anywhere near as efficient as Cocoa when dealing with large formatted content and can get really sluggish as the diffs get larger. So we truncate the diff beyond that point to keep the interface snappy, on the assumption that beyond a certain size diff it becomes unwieldy to manipulate via hunk/line operations anyway. You can always get the full diff using the External Diff option, or tweak the Max Diff Line Count setting to your liking.

comments: author: Dave Parsons
body: Thanks for the answer. It didn't fix the issue, but it turned out to be a problem with one file which GIT throught had garbage in it.


Tags: diff
Unable to pull from a git repository (SourceTree Windows)
Asked by Lee Winder:

I've added an existing git repository to SourceTree in Windows and when trying to pull I (and everyone else on the team) is getting the following error

```
git -c diff.mnemonicprefix=false -c core.quotepath=false fetch originfatal: The remote end hung up unexpectedlyCompleted with errors, see above.
```

Commands work prefectly well in Git Bash so I know we have authentication set up correctly according to the git command line.

If I try to do a fresh clone of the respository, the Repository Type just displays "This is not a valid source path / URL" and the Details button just displays "fatal: The remote end hung up unexpectedly"

SourceTree on Mac works fine with this repository so I'm assuming its an issue with our SSH validation?

Any help would be appreciated as no-one on the team is currently able to use SourceTree for Windows.

Thanks


Answers:
author: stevestreeting
body: SourceTree for Windows currently only supports key-based validation via the PuTTY suite of Windows-native SSH tools. If your existing setup is using the Unix-style OpenSSH then this won't natively be supported yet. We hope to support both styles in future but picked Pageant initially because it was Windows-native and established via the Tortoise tools for over a decade.

Please [see the FAQ](http://sourcetreeapp.com/faq/) 'How do I set up SSH keys for authentication?' section about how to set up your keys in SourceTree - you can import OpenSSH keys into PuTTY easily enough and use the tray-based agent Pageant to keep them in memory.


Tags: moderators

windows
Trouble installing sourceTree
Asked by Ani S:

Here is the install.log file. Basically its failing to download the application, though there is internet connectivity.

"The following properties have been set:

Property: \[AdminUser\] = true {boolean}

Property: \[InstallMode\] = HomeSite {string}

Property: \[NTProductType\] = 1 {int}

Property: \[ProcessorArchitecture\] = AMD64 {string}

Property: \[VersionNT\] = 6.1.1 {version}

Running checks for package 'Microsoft .NET Framework 4.5 (x86 and x64)', phase BuildList

Reading value 'Version' of registry key 'HKLM\\Software\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full'

Read string value '4.5.50709'

Setting value '4.5.50709 {string}' for property 'DotNet45Full_TargetVersion'

The following properties have been set for package 'Microsoft .NET Framework 4.5 (x86 and x64)':

Property: \[DotNet45Full_TargetVersion\] = 4.5.50709 {string}

Running checks for command 'DotNetFX45\\dotNetFx45_Full_x86_x64.exe'

Result of running operator 'ValueEqualTo' on property 'InstallMode' and value 'HomeSite': true

Result of checks for command 'DotNetFX45\\dotNetFx45_Full_x86_x64.exe' is 'Bypass'

Running checks for command 'DotNetFX45\\dotNetFx45_Full_setup.exe'

Result of running operator 'ValueNotEqualTo' on property 'InstallMode' and value 'HomeSite': false

Result of running operator 'VersionGreaterThanOrEqualTo' on property 'DotNet45Full_TargetVersion' and value '4.5.50709': true

Result of checks for command 'DotNetFX45\\dotNetFx45_Full_setup.exe' is 'Bypass'

'Microsoft .NET Framework 4.5 (x86 and x64)' RunCheck result: No Install Needed

Launching Application.

**URLDownloadToCacheFile failed with HRESULT '-2146697208'**

**Error: An error occurred trying to download 'http://downloads.atlassian.com/software/sourcetree/windows/SourceTree.application'.**

"


Answers:
author: stevestreeting
body: You may have an issue with a proxy server setu por otherwise restrictive internet connection. If so, please see this thread: [Is there an offline installer for Windows version of SourceTree? - Atlassian Answers](/questions/149591/is-there-an-offline-installer-for-windows-version-of-sourcetree)
Is there documentation for SourceTree for Windows?
Asked by J Herbers:

I've looked through the app and the Atlassian site and I can't seem to find any standard documentation for SourceTree for Windows. I'm just looknig for simple things like how to use Stash (manually or as part of Rebase).

All I see on this site is a FAQ which answers a few specific questions rather than providing an overview and/or details of the functionality of the app. Might there be any guides or videos describing the main features and how the app might be used?


Answers:
author: stevestreeting
body: The introductory help hasn't been ported over from Windows yet (it's on my list) - right now we're kind of relying on the fact that SourceTree mirrors the git concepts and is hopefully fairly intuitive.

Stash just parks your changes away from your working copy, a bit like manually taking a patch of your uncommitted changes and then resetting (mostly it just automated and records that, although when applying the stash to bring those changes back again later it's a little smarter than patches).

comments: author: J Herbers
body: Some kind of documentation would be good since Git is anything but obvious :)

In my specific example, I'm wondering when I do a pull/rebase if it's auto-stashing any working copy changes beforehand and then reapplying it after ? This is an option in tools like Git Extensions and I use it often.

\[Simpler question: I just used the Stash button to stash changes. But now the Stash button is grayed out and I don't see the stash shown anywhere - how do I get it back?! Oh, I see, there's a Stashes node in the tree in the left panel that I had been ignoring - Stashes was still shown collapsed even though I had just created a stash so it wasn't obvious.\]


author: stevestreeting
body: No, I'm not really a fan of auto-stashing, it's possible the un-stash can fail due to conflicts and I'd prefer if people just got the error message and decided what to do. For me, that's usually to commit then pull/rebase rather than stash/pull/rebase/unstash because I don't like the possibility that my files could end up conflicted without a commit 'stake in the ground'. When you commit locally first, you always have your changes stored unaltered, which is one of the great things about DVCS. The 'pulling into uncommitted changes' approach with the possibility of your uncommitted changes being mixed in with conflicts from other people's work is too much like Subversion for my liking.

The sidebar tree remembers what's expanded and what's not, we try not to mess with this as we've had complaints on the Mac version when we auto-expand things :)


author: Ben Kimball
body: When are we getting the Windows docs already? We are paying customers, and this is abyssmal support.


author: phil side
body: I agree that more documentation would be very helpful. I don't mean a huge manual, but something more than currently exists. What is the significance of the different colored blobs (and lines) in the graph?


Tags: windows
SourceTree gives authentication error but never prompts for password
Asked by Joshua Vanderberg:

I host my own repository at a URL of the form:

<ssh://unixuser@ipaddress/home/unixuser/git/flex>

The IP address in the 10. range, as we VPN into the remote network.

My working copy in my local user directory in windows.

I can use SourceTree just fine if I stick to actions on the local working copy, but any attempt to pull or push results in:

<br />

"fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists."

<br />

The thing is, that I am never even prompted for a password. I am assuming it's using the "unixuser" from the URL. It has never prompted me for a password.  

I also get the same error if I attempt to clone the repository to a new local working copy.

EGit functions perfectly using the exact same working copy. I can pull and push just fine. EGit prompted me for my password the first time, and then saved it.  

In SourceTree I've looked in Tools \| Options \| Authentication, and there are no user id's or passwords stored there, and no option to add one.

I've attempted to add/convert the ssh key I use in cygwin for remote passwordless access to the same host, and nothing I've done so far appears to work. The ssh key setup appears to be generic, and doesn't really seem to reference a particular repository.  

I've also clicked the "terminal" button to launch a terminal, and then added a .ssh/id_rsa and .ssh/id_pud.rsa, and was successfully able to pull from the remote from the command line. But for whatever reason the GUI tool doesn't appear to recognize this setup.


Answers:
author: Joshua Vanderberg
body: I discovered that I had successfully imported the ssh key, but had not launched the "SSH Agent". Perhaps this action should be included in authentication error messages "ssh chosen, but SSH Agent not running, launch now?"  

I would still like to know why I wasn't prompted for a password though. The tool should be able to ssh in without a ssh key, though perhaps that requires the SSH Agent as well.   

Though your online documentation does mention all of the correct steps, it would be nice if it SSH agent were more intuitively integrated into the SourceTree, with something to let you know what it is and when/why you should start it.

comments: author: stevestreeting
body: Yes SSH login is only supported via PuTTY keys right now and not manual passwords (this is also the only supported SSH mechanism in Bitbucket and GitHub). This is logged at <https://jira.atlassian.com/browse/SRCTREEWIN-424>. Support for OpenSSH may be added in future, we chose PuTTY because it's Windows-native and you can import OpenSSH keys (the reverse isn't the case)


author: MikeL
body: smartGit also asks for your password/private key+passphrase. IMHO sourcetree also should be that *smart*.
Can the .git folder be outwith of the repository ?
Asked by Sean Cull:

I am using Sourcetree for Windows with IBM Notes.

When starting from a repository clone I need to add the source files into Eclipse. The problem I have is the older version of eclipse that i need to use has no filter capability so it imports the .git folder and then all sorts of weird recursion issues start as both Sourcetree and Eclipse want to manage the .git folder.

Can I put the .git folder somewhere else ? I have tried to use

=\>mkdir somefolder

=\>mv \* somefolder

and then import the somefolder to eclipse but then in the repository the files are all in a folder called somefolder which causes other confusion.

So -- is it possible to have the .git folder outwith of the repository ?

Thanks


Answers:
author: Felipe Kraemer
body: Hi Sean,

This can be done, by running a command similar to this:

```
git --git-dir=../repo --work-tree=. add foo
```

This, however, is not a good idea because you'd need to specify it with every git command you ever use.

You can also export *GIT_WORK_TREE=.* and *GIT_DIR=../new_location* and Git will pick them up on each command. That will only allow you to work in a single repository per shell, though.

I think your best option is to symlink the .git directory to somewhere else, or creating a symlink to the .git directory from the directory you've chosen.


Tags: eclipse

git
Sourcetree error fatal: Unable to write new index file
Asked by itsricky:

Hi there

I have recently downloaded and started using Sourcetree - love it.

One repo and set of pushes to my SamG bucket was fine, great.

Now I am trying to add files to a new commit using the 'everguide-newsletter-creator' repo, and keep getting this error:

fatal: Unable to write new index file

Why is this happening on my mac? I have ample disk and memory space available?

Thanks.


Answers:
author: stevestreeting
body: This is usually a permissions problem or a file locking problem. I'd check that you have full access to the entire folder and all of its subdirs (especially the .git hidden folder), and that nothing else could be holding persistent locks on the file system somehow (ultimately a reboot should make sure this isn't the case). Otherwise, there are a few ideas here: <http://stackoverflow.com/questions/3813962/git-problem-fatal-unable-to-write-new-index-file>


author: itsricky
body: HI Steven - thanks for this.

Your're right - the files were being stored on a Mac Mini Lion Server - thus SourceTree was unable to reset the owner/group permissions on the files, as I've seen it do locally on my mac.

So - hopefully a feature for the future, but at this time I just switched the Repo over to drop box, and that allowed me to alter the permissions.

Would have saved hours had the command line errors been a little more descriptive!

Not your fault thought :)

Thanks