youngmon/atlassian-qna huggingface dataset:
Github clone button
Asked by Elena Porcelli:

Hi,

I used to click on github "Clone in Mac" button to open SourceTree. In this way I saw automatically the window to add a repository with Source Path already filled. I've removed my account on github and I've created a new one. Everything works but the button on github doesn't work anymore, now it opens [http://mac.github.com/](http://mac.github.com/.). I don't know, it's something that I've to fix in Preferences?


Answers:
author: stevestreeting
body: I believe GitHub doesn't actually send the correct URL until you've logged in to your account using GitHub for Mac at least once. I believe they do this to try to detect that you've got GitHub for Mac installed before giving you the apporpriately formatted clone URL. They store this flag per user account which is why it's stopped working when you created a new account. Once you've logged in with that account in GitHub for Mac once, they will set that flag for your new user and you'll get the clone URLs that SourceTree can then intercept. Unfortunately we have no control over this because they choose when to expose the clone URL for you to click.

comments: author: Elena Porcelli
body: Yes, it works! Thank you very much. Now I can use SourceTree as before.


author: Tim Osborn
body: hmm.. this used to work for me (don't know when it stopped working - not on this computer I guess), but I've just:

* installed Github-mac
* signed in
* cloned a random repo

but I don't know how to intercept the protocol... couldn't get github-mac:// to open in sourcetree until I installed: [](http://www.rubicode.com/Software/RCDefaultApp/)[www.rubicode.com/Software/RCDefaultApp/](http://www.rubicode.com/Software/RCDefaultApp/)

Works a treat now, thanks!


author: Insomniac Software
body: This has been bugging me for a while but I just got around to looking into it. It wasn't easy to find this info. You should add this to your FAQ or in the Preferences where this option is set, create a help ? icon that shows a hint window with this info or a link to this post.
SourceTree uses different git?
Asked by Mumpitzmastar:

I installed a git extension named [git-ftp](https://github.com/resmo/git-ftp/).

I want to use this extension everytime i make a pull from a remote repo to push the changes to a remote FTP Server where my private staging webspace is, so that i have the changes from others also over there.

When i make my pull from the command line in terminal, everything is fine, but when i use SourceTree to pull, the output says "git: 'ftp' is not a git command. See 'git --help'." Use of git-ftp is like "git ftp push" to push the changes to FTP.

The git version is changed via preferences to the same version i get if i type in "which git" on the command line. So why ST doesn know "git ftp" and how do i change that?


Answers:
author: Mumpitzmastar
body: Now i found a solution that works. In the Script, i run the command directly with the path where is installed git-ftp. Now it looks like:

```
~/git-ftp/git-ftp push | tee "post-merge.log"
```

Where \~/git-ftp/ is the folder i cloned the repository to. With this in my hooks, i get also the correct output inside SourceTree's command line.


author: Mumpitzmastar
body: The Hook-Script i wrote gave me some Details. The User that excutes the Script, where the Script is executed and the exit code of the command 'git ftp push'. The User and the path of execution are in both ways the same.

The exit code of the command is 1 if ST trys to execute. The developer told me there is no exit code 1, so it has to be a problem in the way im using git-ftp.

For your information, here is the conversation i had with the dev of git-ftp. <https://github.com/resmo/git-ftp/issues/159>

comments: author: stevestreeting
body: Exit code 1 is very common exit code from the shell, for example not being able to find a command. To find out exactly what it means and what is failing, you really need to see the underlying steps and which one produces an error. Do you get that from git-ftp, or is there a way you can make it output more diagnostics (like a -v option)?


author: Mumpitzmastar
body: The Hook-Script contains following lines:

```
git ftp push -v &gt;&gt; "post-merge.log"rtrn=$?if [ $rtrn -ne 0 ]; thenecho "git ftp push failed with exit code $rtrn" &gt;&gt; "post-merge.log"fi
```

The output inside the logfile says exit code 1. What ST gives me back was posted in my opening Post.

As i said, from command line everything runs fine. Is also tried a simple script that just runs 'git ftp push' and bind that via custom actions. But it also fails with the same message. "git: 'ftp' is not a git command. See 'git --help'."


author: stevestreeting
body: Where is the 'ftp' command implementation installed in relation to your system git?


author: stevestreeting
body: If you've already used Preferences \> Git to change to the system git then that should mirror what you use on the command line. That is, unless git-ftp uses some a mechanism to function which only works from the command-line.


Tags: ftp

git
Mercurial Phases support
Asked by Oliver Zhou:

Hi Author,

Mercurial 2.1 introduce an important new feature called Mercurial Phase to prevent common mistakes when modifying history (for instance, with the mq or rebase extensions)

Is there any plan in SourceTree to support this feature?


Answers:
author: stevestreeting
body: SourceTree automatically benefits from Phase's prevention of history rewriting after pushing. The only thing it doesn't let you do yet is change the phase stages if for some reason you want to override that default behaviour.

comments: author: Oliver Zhou
body: yes, you are right. It will be better if SourceTree can add a column in log view to display the phase related to the changeset as well


author: Nic Heath
body: Please vote for this JIRA issue to add hg phase column. <https://jira.atlassian.com/browse/SRCTREEWIN-2143>


author: Oliver Zhou
body: See this blog: http://www.logilab.org/blogentry/88203
Will SourceTree updates be available on the apple mac app store?
Asked by Tarun Kothuri:

Will SourceTree updates be available on the apple mac app store?

The appstore version is now 1.4.4 (updated on Jun 15, 2012)

The direct download version is 1.5.3


Answers:
author: rverschoor
body: For now, the newer versions are not available in the App Store.  
The [Between a rock and a hard place -- our decision to abandon the Mac App Store](http://blogs.atlassian.com/2012/02/between-a-rock-and-a-hard-place-our-decision-to-abandon-the-mac-app-store/) blogpost describes why.

So you'll have to download the latest version from <http://www.sourcetreeapp.com>


author: Chris Selin
body: It looks like you guys updated the app store version after all! I just updated to 1.5.3 via tha Mac App Store.

comments: author: stevestreeting
body: Yes, we submitted it just to see if it would get through, and we're surprised that it did. We can't guarantee future versions will though.


Tags: update
Support hg commit --amend
Asked by Oliver Zhou:

amend option for hg commit is introduced in Mercurial 2.2.

The --amend flag can be used to amend the parent of the working directory

with a new commit that contains the changes in the parent in addition to

those currently reported by "hg status", if there are any. The old commit

is stored in a backup bundle in ".hg/strip-backup" (see "hg help bundle"

and "hg help unbundle" on how to restore it).

Is it possible to support this flag in sourceTree?


Answers:
author: stevestreeting
body: On the list, but you can already do it by using the existing 'strip' command with the '--keep' option, which SourceTree exposes already: right-click the latest commit, Strip from Here, check the box to keep working copy. This actually lets you strip \& re-combine multiple commits which --amend doesn't.
How do I clone a GIT remote repository ?
Asked by Yasser Chemaytilly:

I am trying to add a GIT remote repository (clone it) using SourceTree

in command line I would use

git clone git@repos.xxx.com:bbbb

to clone the bbbb repository from my company's GIT server

Is it possible in SourceTree? How ?

<br />


Answers:
author: stevestreeting
body: Sure, just copy the URL and paste it into the Clone box (Cmd-N, File \> New, or the Add Repository toolbar button on the Bookmarks window). Or you can drag \& drop any clone link from a browser into the bookmarks window too.

comments: author: Yasser Chemaytilly
body: Thanks for your quick answer Steve.

What would be the URL for a GIT repository ? when you're in command line you don't use URLs..

again this is proper hosted GIT and not GITHUB or something similar

what would be the URL the below repository ?

git clone git@repos.xxx.com:bbbb

<br />

sorry this maybe very basic but I'm not a big expert on GIT yet - that's why I was looking to use SourceTree to help me use it


author: stevestreeting
body: The bit after 'git clone' is the URL, I know it doesn't look like a HTTP URL but effectively that's what it is - that's a git-specific URL.

In fact in the latest SourceTree (1.5.3) if you pasted the entire command including the 'git clone' into the Clone window, SourceTree would figure it out and strip off the 'git clone' part for you. We're friendly like that :)


author: Yasser Chemaytilly
body: thanks ! worked perfectly..

I do think if there was a little hint or something it would make things easier

I asked other people and they all had cloned the repos in command line then used sourcetree

thanks again


author: Alexander Belchenko
body: I should say that using File - New is not obvious for clone. Why there is no dedicated Clone menu item?


author: stevestreeting
body: Logged: <https://jira.atlassian.com/browse/SRCTREE-1361>


Tags: clone
SourceTree and git:// urls
Asked by mmaereanadobecom:

In latest SourceTree (1.5.3) I'm trying to Add a Repository using a git:// url (like git://source.ffmpeg.org/ffmpeg.git) and it doesn't work. I have to find an http(s) url (which doesn't always exist) for SourceTree to be able to use (like <https://github.com/FFmpeg/FFmpeg> that isn't even hosted in the same place).


Answers:
author: stevestreeting
body: I just fed 'git://source.ffmpeg.org/ffmpeg.git' in to SourceTree 1.5.3 and it cloned just fine.

SourceTree just passes the URL down to git anyway - what version of Git are you using, the internal version or your system Git?

comments: author: mmaereanadobecom
body: It turns out that the firewall blocks the git port.

Sorry for the false alarm.
Log view shows some html files as binary files, other html files as text files
Asked by Roger Erens:

In my history view, when I look at some .htm files of my (e.g.) initial commit, they show up in the right pane as binary files, with some buttons "Preview 'After'", "Open 'Before'" (which is grayed out), and an "Open 'After'".

Below that I can see some sort of mini browser window (a la Preview that would show up when pressing the space bar in the finder).

Other .htm files in that same commit just show up with the number of lines added, and the source code shown.

Both types show a 'Reverse' button.

Why don't all my .htm files show up as plain text files, like they do in File Status view?


Answers:
author: stevestreeting
body: The ones that show up as binary are probably in a non-UTF8 text encoding, maybe UTF-16. Neither git nor hg can display text diffs for UTF-16 content, only UTF8 - they always treat anything else as binary, and therefore so does SourceTree.

comments: author: Roger Erens
body: file -I my_page.htm results in

my_page.htm: text/html; charset=binary

I think this encoding resulted from the document having been stored/retrieved by the user to/from an (XML-)database and/or confusing BLOBs and CLOBs. I'll contact him to clear this further up. Thanks for your answer.


author: thinsoldier
body: I'm having the same problem. My .html file is definitely utf-8. If duplicate the file, the duplicate shows in SourceTree as text. If I delete the original file and rename the duplicate to match the original name, it shows up as binary again.


author: mkarlovich
body: SourceTree used to allow diffing utf-16 in UI but it does not work anymore. It was accomplished using the following in .gitattributes:

\[attr\]utf16 diff merge -crlf  
\*.sj utf16

I have an old version installed (.9.2.3) where it would read this and would display in the viewer panel. Can this be fixed? I'd rather not convert the files to UTF-8 or stay on the old version. This declaration works fine for other external viewers, it tells git to treat the file as text.
How to make Custom Action not waiting for script ends
Asked by Oliver Zhou:

Hi Author,

I have a custom action that call Tortiesehg Patch Reject File Editor since SourceTree currently doesn't provide this feature.

I wrote a script like this:

```
#!/bin/bashsource ~/.bash_profileecho $PYTHONPATHecho $PATHthg rejects $1
```

SourceTree will hang until I close the patch reject file editor window, that's not really what I expect.

Is it possible to provide an option that let SourceTree not wait for the script ending?


Answers:
author: stevestreeting
body: Two ways:

1. Enable the 'Open in a Separate Window' option on the Custom Action. This makes the command execute in a separate window which is not modal on the repository so you don't have to wait
2. Add '\&' to the end of your thg command so that the process is not blocking on the script

comments: author: Oliver Zhou
body: I tried them both, but unfortunently doesn't work for me.


author: stevestreeting
body: Please define "doesn't work".


author: Oliver Zhou
body: It just has no change, SourceTree still hang


author: stevestreeting
body: 'Hang'? No Custom Action I've ever seen causes this. Are you sure thg just doesn't like being called like this?


author: Oliver Zhou
body: Finally I figure out the solution. It's not a problem of SourceTree

Use --nofork option for thg so that it will not run a background job for THG GUI.

thg --nofork rejects $1
Custom Actions Enhancement
Asked by Oliver Zhou:

Hi Author,

Since right now SourceTree doesn't support Mercurial Queue, I have to use them via Terminal.

But I found SourceTree has a **Cutom Actions** feature that allow me call external commands.

Therefore, I create some custom actions for Mercurial Queue, however, I need pass extra parameter like a patch name to "**hg qnew mypatch** " to run **hg qnew** command.

Is it possible that I define the parameters like this: **qnew $PATCHNAME**, and then when I invoke this action, SourceTree popup a dialog to allow me assign value to $PATCHNAME.

I found SourceTree has already had something like $REPO, $FILE, can we extend this a little bit?

Just my two cents


Answers:
author: stevestreeting
body: Thanks, the ability to define user-prompted parameters for Custom Actions is on the feature requests backlog at the moment...

comments: author: david bru
body: it's a joke? the issue is opened the 18 june 2014 near 2 years later !!!

[SRCTREEWIN-1735](https://jira.atlassian.com/browse/SRCTREEWIN-1735)
Problem with Kaleidoscope as diff tool for Mercurial
Asked by Oliver Zhou:

I have problem with Kaleidoscope(1.1.6) as diff tool for Mercurial.

When I select a file and then click External Diff, everything is okay.

However if choose mulitple files, then click External Diff, Only a file compare is opened in Kaleidoscope.

However, it's okay when I choose FileMerge or P4Merge as Diff tool.

It looks like a Kaleidoscope specific issue.


Answers:
author: stevestreeting
body: Yes, I use Kaleidoscope myself and this is a know issue. It's actually a problem with Kaleidoscope which I reported to them almost 2 years ago now, and they acknowledged it was a bug - unfortunately since Sofa (the original developer) was acquired and Kaleidoscope was sold off, this issue doesn't appear to have been addressed in any updates.

I've found it can be slightly more reliable if Kaleidoscope is already open when you diff the multiple files, but it's definitely not consistent. The issue seems to be in the communication between the command-line tool and the Kaleidoscope app.

comments: author: Oliver Zhou
body: Thanks for the answer.

I just evaluate Kaleidoscope for a while.

Because of this, I have to continue to use FileMerge as diff tool and P4Merge as merge tool
SourceTree not working on Mac OS X Mountain Lion
Asked by Bernd Waschneck:

Hello,

I have installed SourceTree on Mountain Lion, once over the AppStore and once as direct download. The App always starts without any problems but I cannot get a connection to a svn server. I enter the Server URL and hit enter, and I just get the rotating waiting sign. I can check out the repository over git svn in the console and everything works.

I have already installed the Command Line Tools over Xcode and the py2.7-hgsubversion package with macports.

Any Idea why sourcetree still does not work?

Thanks a lot. Bernd


Answers:
author: stevestreeting
body: Unfortunately Mountain Lion removed both Subversion and the python bindings by default. I've created 2 KB articles (one for git-svn, one for hgsubversion) which worked for me from a clean Mountain Lion install:

[Hgsubversion on Mountain Lion](https://confluence.atlassian.com/display/SOURCETREEKB/Hgsubversion+bindings+errors+on+Mountain+Lion)

[Git-svn on Mountain Lion](https://confluence.atlassian.com/display/SOURCETREEKB/git-svn+problems+on+Mountain+Lion)

It sounds like you may have already followed these instructions but I've included them for completeness.

If, after setting this up, you get the spinner, it's usually this: [Perpetual spinner when trying to clone Subversion](https://confluence.atlassian.com/display/SOURCETREEKB/Perpetual+Spinner+when+Trying+to+Clone+Subversion)

comments: author: Bernd Waschneck
body: Thanks for your help! I went through all the tutorials you posted. It's still not working, but I think i'm getting closer. Problem is still the same.

My standart python Version is 2.6, but I have 2.7 installed . Does Sourcetree call 2.7 explicitly or does it just call python?

Concerning the Hgsubversion bindings: As I said, I have already installed them with macports. I tried to install them with Homebrew again, but I get some arrows when Homebrew detects the macports installation. But it should also work with macports, if I changed the command to :

sudo sh -c 'echo /opt/local/lib/libpython2.7.dylib \> /Library/Python/2.7/site-packages/subversion.pth'

But I'm not sure about that part.

How can I checkout in python wether the bindings are installed?

Thanks a lot for your help.


author: stevestreeting
body: SourceTree doesn't call Python itself, but the hg script does. Mercurial does still work with Python 2.6, because that's the default version on Mac OS X 10.6, but it's sub-optimal because the precompiled Mercurial is based on 2.7, so using 2.6 will require recompilation. Worse, any bindings you've installed for Python 2.7 won't be usable. Python 2.7 is the default version for Mac OS 10.7 and 10.8, so I assume you've changed this for some other reason. Is there any way you can revert to the system default Python in general, and just specify Python 2.6 when you need it?

If not, you'll probably need to install the Python 2.6 SVN bindings separately, which could get tricky if Macports is wanting to use the latest. I'm sure it's possible, but if you can avoid it it's probably better.
How do I organize branches from different repo's?
Asked by Richard Grossman:

How do I organize branches from different repo's? I have two remote repo's, but SourceTree shows all the branches mixed toether in the branch list on the left, and the branch tree shows branches of completely unrelated projects that are on different remote repos.


Answers:
author: stevestreeting
body: Erm, SourceTree can never show branches from completely unrelated projects, your remotes would have to be different forks of the same repo. Assuming we're talking about git here, these branches will show under the remote in question. They will only appear in the local branch section if you checked them out from the remote. If you did that and realised you didn't intend to, you can delete the local branches by right-clicking on them in the sidebar and selecting 'Delete'.
Soruce Tree Add New File
Asked by Nirav Shah:

Hi ,

I would like to add new image file. How can I add.

Thanks

Nirav


Answers:
author: stevestreeting
body: One way is to select the file in the File Status view (Cmd-1) and click the 'Add' button on the toolbar. The file will then be added with the next commit.

comments: author: Nirav Shah
body: Hi Steve ,

Thank you very much.

Actually I have added one image in my img folder and it seems that image is not visible in Working Copy in File Status. How can I add it ? Not sure but If I change any file then its visible but what about newly added files ? Thank you once again.


author: stevestreeting
body: If the file isn't showing there are 2 possible reasons:

1. It's already added and hasn't been modified (Clean), or
2. It's been ignored by either your global ignore file, or the local one for this repository

If it's the former, changing the filter at the top of the file list from 'Show Pending' to 'Show Clean' will display it. If it's the latter, then changing the filter to 'Show Ignored' will display it.

If it shows up under 'Show Ignored', you can add it from this list. If you want to avoid the problem in future, you need to find the incorrect entry in your ignore files. The global one will be accessible from Preferences \> Git (or Mercurial depending on what system this is). The local one will be inside your repository, called .gitignore or .hgignore. Check these files for entries which match your file and remove them.
Installation Error
Asked by Christina Gambacorta:

Hi,

I'm currently trying install SourceTree onto my computer and have received the following error message:

The Finder can't complete the operation because some data in "SourceTree" can't be read or written.  
(Error code -36)

Do you know what this means or how I can fix it?

Thanks,

Christina


Answers:
author: stevestreeting
body: I've never seen that one before, it suggests either that the package is corrupt, or that maybe that you don't have permission to the DMG for some reason, maybe because it was downloaded under another account? Either way the solution is likely to be to re-download from <http://sourcetreeapp.com>.