youngmon/atlassian-qna huggingface dataset:
How can I clone external repository with SourceTree
Asked by Alexander Belchenko:

I can't find a way to clone arbitrary external repository with Source Tree. E.g. my company uses [codebasehq.com](http://codebasehq.com) to host projects. How can I clone git repository from [codebasehq.com](http://codebasehq.com) using SourceTree and without need to open Terminal and type \`git clone URL\`? Is it possible?

Here is the same qusetion with answer: https://answers.atlassian.com/questions/78279/how-do-i-clone-a-git-remote-repository

Somehow it didn't show up in search results when I've tried to create my question.

I'd say that using File - New for clone is not very obvious and untuitive. Maybe it's just me.


Answers:
author: KieranA
body: Hi Alexander,

On the main bookmarks window there's a repository icon with a '+' on it which signifies adding a repository to your list of bookmarks, so there is a clickable icon (the very first one) on the main toolbar to do this without having to go through File \> New. You are essentially adding a new repository, it just can either be a cloned repository, a working copy or a brand new repository. The icons on the sheet after clicking either File \> New or hitting the add bookmark icon in the toolbar are then more specific, i.e. the clone icon is more reflective of that operation.

We're always looking for feedback though, so I'll make sure this is discussed.


Tags: clone

git
DEFAULT REMOTE REPO PULL TO INCLUDE MESSAGES
Asked by Richard Grossman:

Every time I do a pull from a remote repo branch, I always check "Include messages from commits being merged in merge commit".

It would be great if I could pre-set this via a preference setting, or just persisting the last-used check-mark status.


Answers:
author: Colin Goudie
body: Why the caps mate and what's the question? :)

But to get to your point, these items are best logged in JIRA @ [jira.atlassian.com](http://jira.atlassian.com)


Tags: git
How do I hook this up to Amazon Web Services (Elastic Beanstalk)
Asked by charliefrancisuk:

I recently switched to Amazon Web Services and was wondering if it's possible to link up Source Tree to the git repository that they create to update the FTP.

Thanks


Answers:
author: Steffen Opel
body: This question has recently come up again via [How do i push to Amazon Elastic Beanstalk from SourceTree?](https://answers.atlassian.com/questions/258433/how-do-i-push-to-amazon-elastic-beanstalk-from-sourcetree), please see the answers from [Seth Foss](https://answers.atlassian.com/questions/258433/how-do-i-push-to-amazon-elastic-beanstalk-from-sourcetree) and [Andr?s Boedo](https://answers.atlassian.com/questions/258433/how-do-i-push-to-amazon-elastic-beanstalk-from-sourcetree) for details, in summary:
> \[...\] you should be able to get what you want pretty easily with custom actions.
>
> In Windows, these can be set up in Tools \> Options. For Mac, the tab is in Preferences.
>
> ----
>
> \[...\]
>
> In case anyone wants to do the same thing, what I created was a Custom Action, which runs the script: /usr/bin/git with parameters aws.push


author: stevestreeting
body: I haven't used this myself, but so long as it's a standard Git remote, you can simply use the URL as a remote in SourceTree (Settings in the top-right of the repository toolbar). SourceTree can clone / pull / push with any Git remote that has a reachable URL.


Tags: aws

beanstalk
Greyed out Modified files wont commit?
Asked by Aaron Lemke:

A friend and i are using SourceTree to make a game in Unity and i recently went through and reorganized all of the files and folders and deleted a bunch of extra files. Now when i try to commit however there is only one file with the yellow icon next to it and all the rest are greyed out. When i commit only this yellow file is available for pushing.

I am fairly new to SourceTree, but havent been able to find help elsewhere.

Any suggestions?

Thanks.


Answers:
author: stevestreeting
body: When you say 'greyed out', do you mean they have an icon like a grey circle with a horizontal line? That means 'Missing' (if you hover your pointer over the icon you'll get a tooltip telling you what status it's indicating).

'Missing' files are those which used to be tracked but are now missing in your working copy, which is consistent with you deleting a bunch of files. Right now, your repository history thinks those files should still be there, so if you want to get rid of them permanently, you need to tell ST that you intended to get rid of them, and then commit this.

To indicate that you really did mean to delete the files, you can do one of 2 things:

1. Select all the Missing files and click Remove (right-click menu, or toolbar), or
2. Just click the Add/Remove button on the toolbar, which will automatically mark any Missing files as Removed (and also add any untracked files that aren't being ignored)

Either one will turn these files into 'Removed' rather than 'Missing', which means the icon changes to a red version of the same icon. When you commit these changes, you permanently mark the files as removed from your repository.

comments: author: Aaron Lemke
body: Thank you that answered my question !
Working on multiple independent git-flow feature branches
Asked by David Bainbridge:

What is the procedure for working on multiple independent git-flow initiated features? Let's say I have started one feature but stop working on that feature. I now want to start work on a new feature based on the "develop" branch but does not use anything from the feature I already started. I also want to keep the other feature's code for committing later.

Edit: I see this is a duplicate of this question but I am not clear about the two options in the answer given. I am keeping my feature branches local. If I commit the changes to a local branch "feature A" then start a new git-flow local branch "feature B" will feature B contain the changes for feature A (both are branched from the "develop" branch). Or is the better option to "stash" changes for feature A and start the new feature B branch?


Answers:
author: stevestreeting
body: You can commit your WIP changes to the feature branch, then start another feature. Features always begin from the develop branch anyway, but you can checkout the develop branch explicitly first if that makes you feel more comfortable. All feature branches are independent, they will only share code if one of them was finished (therefore merged back into develop) before the other was started.

comments: author: stevestreeting
body: It might be worth clarifying that it's fine and indeed very common to have multiple feature branches in progress at once. You can't, however, have more than one release or hotfix branch in progress at once. This makes sense because you really only want to use these while you're preparing the next release / hotfix, there's no reason to have many of them in parallel.


author: David Bainbridge
body: Thanks. That clarified it for me.


author: Krishan Gopal
body: Here question is how do you test multiple features?

Do you have featureA.example.com featureB.example.com like setup so that QA can test all features simultaniously?


author: DazJCampbell
body: "there's no reason to have many of them in parallel"

Maybe not many, but I think we have a pretty good reason for having several of them in parallel: we work towards several planned releases in parallel. More specifically, we test towards several releases in parallel: while one release is in user acceptance test, the next is in system test, etc. We don't want to accept any new features for a given release while we test (and certainly not for a future, perhaps unrelated release), so wouldn't it seem reasonable to branch off for each release before we start testing? That being the case, we will usually have several active at the same time. Maybe it depends on whether you're working on a self-contained software product or, as we are, on elements of a business system that includes people and processes.
Sourcetree use alterative ruby
Asked by Florian Bachmann:

Hi, is it possible to use an alternative ruby version within sourcetree?

I need it, to use the newest version of lolcommits

Sourcetree always tries to use the system ruby Version 1.8

instead of my newly installed ruby version 1.9.3 (works fine in terminal)

here my git commit output from sourcetree:

```
git -c diff.mnemonicprefix=false -c core.quotepath=false commit -q -F /var/folders/yz/6ngr49dd0fv22kphv_yq_47m0000gn/T/SourceTreeTemp.bxFaJm /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:777:in `report_activate_error': Could not find RubyGem lolcommits (&gt;= 0) (Gem::LoadError)	from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:211:in `activate'	from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:1056:in `gem'	from /usr/bin/lolcommits:18Completed successfully
```


Answers:
author: Florian Bachmann
body: thanks for the hint, but editing /etc/paths and /etc/launchd.conf doesn't take effect on Mountain Lion!

Apple's Developer Forums say this:
>
> Change the Info.plist of the .app itself to contain an "LSEnvironment" dictionary with the environment variables you want.
>
> \~/.MacOSX/environment.plist is no longer supported.
>
So I edit SourceTree's Info.plist (right click on "SourceTree.app" and then "Show package contents") and added a new key/dict pair called:

```
&lt;key&gt;LSEnvironment&lt;/key&gt;&lt;dict&gt;     &lt;key&gt;PATH&lt;/key&gt;     &lt;string&gt;/Users/flori/.rvm/gems/ruby-1.9.3-p362/bin:/Users/flori/.rvm/gems/ruby-1.9.3-p362@global/bin:/Users/flori/.rvm/rubies/ruby-1.9.3-p326/bin:/Users/flori/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:&lt;/string&gt;&lt;/dict&gt;
```

(see: <http://developer.apple.com/library/ios/#documentation/general/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html>)

now my SourceTree App uses git 1.9.3 :-)

regards,

Flori


author: stevestreeting
body: [RVM](https://rvm.io//) is a good way to make Ruby versions co-exist cleanly, but if you don't want to do that, you'll need to make sure that all Mac apps use the new version rather than just the terminal. You've probably updated your PATH to point to the new Ruby, but this has no effect on Mac apps because they're launched by a process called 'launchd' whose environment is entirely separate from the terminal.

To update the path across the board for Mac apps too, you need to update /etc/paths and reboot. Hopefully that will solve your problem.
Best Practice for Reverting...
Asked by Richard Coy:

Hello, I am totally new to this git and repositories thing but I can see the benifits right away.

What is the best way to completely revert to a previous commit? Let's say I want to go back three commits ago and start over from that point. I'm using SourceTree.


Answers:
author: MikeL
body: If you want to trash the last 3 commits, select the commit you want to keep and invoke reset with the hard-option.

comments: author: Richard Coy
body: Thanks Mike. So in SourceTree is that right click on the commit I want and then choose "Reset master to this commit"? Does that change my local and remote repositories at the same time or is there a step after that for syncing?


author: stevestreeting
body: If you've already pushed these commits to a remote then you probably shouldn't be doing this, because the commits could already have been seen by someone else, which will then cause them problems if they're effectively orphaned and no longer part of the branch going forward.

If you know for **sure** that no-one except you has seen these commits then you can push your branch to the remote to bring it back into sync with your own local repo. What the reset is doing is moving the branch pointer backwards, orphaning the commits you made before, and which will get garbage collected eventually if nothing continued to point to them.


author: Richard Coy
body: Thanks Steve. I'm the only developer on my current project so it's safe to do this but I'll remember in the future not to do it if I'm working with others.
How do I prune tags?
Asked by Ken Taylor:

The Graph in the Historical view can become quite confusing when there are many branches. I have been able to simplify it for myself by removing remote branches that I have no interest in:

git config remote.origin.fetch +refs/heads/master:refs/remotes/origin/master  
git config --add remote.origin.fetch +refs/heads/mybranch:refs/remotes/origin/mybranch

git branch -r -d origin/yourbranch

I also remove any tags associated with yourbranch:

git tag -d yourbranch_tag1

But, on a subsequent fetch, even though yourbranch is not retreived, tags on yourbranch are retrieved, which causes the branch to shown again in the Historical view.

Can I configure SourceTree to fetch without getting tags like:

git fetch -n

Or not fetch at all so I can do it manually with the above command?


Answers:
author: stevestreeting
body: There is no option to use 'git fetch -n' in SourceTree, but you can configure this in the config file for this repo:

```
git config --add remote.origin.tagopt --no-tags
```


Tags: fetch

tag
I messed up with Git-flow... help!
Asked by Gopi Aravind:

Hey,

I made a local commit and tried pushing it to bitbucket. It didn't work so I started playing around.. I hit git-flow and hit the default option and OK.. Now all my code has reverted to the original! I've lost all my hour's work...

Is there a way to switch back to pre-git-flow??


Answers:
author: Gopi Aravind
body: I got it back! I didn't stash it or anything...

I found the head ref. no of the old commit in one of the files in .git folder and manually changed the actual head to that code. And boom.

Whew. Moving to a mac is painful.


author: twong_atlassian
body: Ouch.

I hate to be the harbringer of bad news, but I think that your lost commit is hosed. Did you stash or anything before you did it?

comments: author: Gopi Aravind
body: I got it back! I didn't stash it or anything...

I found the head ref. no of the old commit in one of the files in .git folder and manually changed the actual head to that code. And boom.

Whew. Moving to a mac is painful.


author: twong_atlassian
body: Yay! Glad you got your stuff back.

I've been on a mac professionally for years now. After you get used to it... I swear I get a lot more work done than when I was on windows. Maybe it's just selection bias.
SourceTree external diff starts in different desktop (Mac Mountain Lion)
Asked by mjzbik:

I can't seem to get the external diff tool to start on the same desktop as SourceTree. ST is on desktop #2 and the tool always starts on desktop #1.

Bug? Pilot error?


Answers:
author: KieranA
body: SourceTree can't influence where an external diff tool is opened, it simply gives your external diff tool some parameters so it can open the relevant files. This problem is likely caused by your external diff tool being originally opened on a different desktop, so it then remembers where it was originally opened. When SourceTree opens the external diff tool, it simply opens where it was last opened.

Try opening the diff tool outside of SourceTree, moving it to your desired desktop, and then closing it (to ensure those settings are saved). The next time you run an external diff it should be on the correct desktop.

Cheers
Cloning from an SVN repository to a local git repository on Mountain Lion gives me a Git::SVN error
Asked by david_gileadi:

I'm trying to clone <https://svn.mirthcorp.com/connect/> into a local git repository. I consistently get a Git::SVN error.

System:

SourceTree 1.5.6

Mountain Lion 10.8.2

XCode 4.5.2, command-line tools are installed.

The following is the output from SourceTree:

git -c diff.mnemonicprefix=false -c core.quotepath=false svn clone --trunk=trunk --branches=branches --tags=tags <https://svn.mirthcorp.com/connect/> /Users/gileadis/Projects/mirth

Initialized empty Git repository in /Users/gileadis/Projects/mirth/.git/

Can't locate object method path via package Git::SVN at /usr/local/git/lib/perl5/site_perl/Git/SVN/Ra.pm line 338.

Completed with errors, see above


Answers:
author: david_gileadi
body: It turns out a bug got created for this issue.

comments: author: William Bath
body: I've got the same issue on Lion with Source Tree 1.5.8  

What is the bug ticket? What is the issue / workarounds? Some info would be useful?


author: William Bath
body: I switched from the embedded git to using the external one on my system (just pulled down the latest and pointed Source Tree at it through preferences) and it resolved the issue.


author: Rasheed Barnes
body: Switching from embedded GIT to the system GIT worked for me as well.


author: LucasA
body: Hi David,

Please confirm if you have perform a full SVN synv of this repository to a local one and try to run SVN to GIT from this local repo. I believe it'll help you on this process.

Lucas Lima

Atlassian Support


author: Shwetali Shinde
body: Hi [@david_gileadi](/t5/user/viewprofilepage/user-id/591455) , [@LucasA](/t5/user/viewprofilepage/user-id/345509) , [@William Bath](/t5/user/viewprofilepage/user-id/595044) , [@Rasheed Barnes](/t5/user/viewprofilepage/user-id/657013)

Kind request to you all experts ,Could you please help me in below matter .

I have installed git,git-svn and subversion on my Ubantu still its gives below error.

Please help me to resolve this issue .

Error:

"***Can't load '/usr/local/lib/x86_64-linux-gnu/perl/5.30.0/auto/SVN/_Core/_Core.so' for module SVN::_Core: libsvn_diff-1.so.0: cannot open shared object file: No such file or directory at /usr/lib/x86_64-linux-gnu/perl/5.30/DynaLoader.pm line 193.***   
***at /usr/local/lib/x86_64-linux-gnu/perl/5.30.0/SVN/Base.pm line 59.***   
***BEGIN failed--compilation aborted at /usr/local/lib/x86_64-linux-gnu/perl/5.30.0/SVN/Core.pm line 5.***   
***Compilation failed in require at /usr/share/perl5/Git/SVN/Utils.pm line 6.***   
***BEGIN failed--compilation aborted at /usr/share/perl5/Git/SVN/Utils.pm line 6.***   
***Compilation failed in require at /usr/share/perl5/Git/SVN.pm line 32.***   
***BEGIN failed--compilation aborted at /usr/share/perl5/Git/SVN.pm line 32.***   
***Compilation failed in require at /usr/lib/git-core/git-svn line 23.***   
***BEGIN failed--compilation aborted at /usr/lib/git-core/git-svn line 23.***   
***git-svn: ERROR: Unable to determine version."***

Thanks ,

Shwetali
Can SourceTree diff markdown with file extension .md or .markdown?
Asked by S Baker:

I'm using Xcode and GitHub, would like SourceTree to diff README.md.

SourcTree says it's a binary file, doesn't display a diff.


Answers:
author: stevestreeting
body: The problem is likely that you've encoded the file as UTF-16. Git and Mercurial can only diff/merge UTF-8 text files.

comments: author: S Baker
body: Thanks! In Xcode File Inspector I converted encoding from UTF-16 to UTF-8 and now when I edit the file SourceTree shows the diff.


author: KieranA
body: I think this might have something to do with file associations, because I'm using both .markdown/.md file types and SourceTree displays them fine for me. Could you change the "Always Open With" option on both markdown/md files? (Ctrl+click -\> Open With -\> Other -\> check "Always Open With" and pick say, textedit?)


author: S Baker
body: Related question

<https://answers.atlassian.com/questions/115992/is-it-possible-for-sourcetree-to-use-preview-for-xcode-project-files>


Tags: diff

markdown
How do I configure Sourcetree to use UltraCompare for diff and merge on my mac
Asked by Mark McCurry:

Been using Sourcetree for my GIT repos because its SWEET! Recently picked up UltraCompare (part of UltraEdit) because I needed a good diff toll on the mac (and linux and win boxes). UC looks capable of doing diffs and merges, but I can't seem to get Sourcetree to use it. Are there instructions somewhere for setting it up? Thanks!


Answers:
author: chuck bradford
body: The updated command is now:

/Applications/UltraCompareX.app/Contents/MacOS/UltraCompareX

cheers


author: KieranA
body: Hi Mark,

SourceTree is able to do this, I've just had a bash myself doing this using UltraCompare. As is standard, UltraCompare is installed to /Applications/UltraCompare.app/ so what you want to do is to go into SourceTree's preferences and go to the "diff" tab. In here, change the "Visual Diff Tool" drop-down to "Other" then set the "Diff Command" to be /Applications/UltraCompare.app/Contents/MacOS/UltraCompare and then set the arguments to be $LOCAL $REMOTE (as shown in the screenshot). Then when you do a diff, UltraCompare will open instead. Below is a screenshot of my setup which I tested:

![](http://i.imgur.com/f3YaO.png)

If you need any further help, just ask :)

*(note: the diff options for UltraCompare are here: <http://www.ultraedit.com/help/article/command-line-options-49.html>)*

comments: author: KieranA
body: You're welcome, thanks very much!


author: Mark McCurry
body: Kieran,

Thank you! There it is. I tried UltraCompare, UltraCompare.app, and /Applications/UltraCompare.app. It never struck me to drill into the app package for the executable. Excellent sleuthing! I guess, SourceTree being a Mac app, I expected it to do some of that digging for us. ;o) If the author would come out with a Linux port, I'd bake him a cake! SourceTree seriously rocks. Now to chase down the UC command line for merge and conflict resolution using the link you provided. Thanks again!!

Mark
Remember "show" settings per project
Asked by mac mac:

Hi,

Currently, the "show" (Pending, Conflicts, ..., All) setting of the browser window seems to be sort-of global: when opening a project window it is opened with the last selected "show" setting.

Is it possible to remember this setting per-project?

Most of the time I have it set to "Pending", but for some projects I like it to be "All" (eg. my gitolite configuration repo)


Answers:
author: stevestreeting
body: Most of the detail filters are global on the assumption that you want to see things the same way most of the time and not have to switch for every repo you open. But I guess the file filter perhaps makes more sense as a per-repo setting, I've logged this: <https://jira.atlassian.com/browse/SRCTREE-1329>


author: mac mac
body: Thanks.

Looking into the matter some more, I've found that when I:

1. Open repo A (files pending showing)
2. Open repo B (also "peding")
3. Change files filter to "all" for B
4. Close B

I have the following situation: "files all" is stored as my preference, but repo A is still showing "peding".

When I now

1. Close repo A (showing pending)
2. Open repo A

The repo A will open with the files filter set to "All".

I'm afraid, to me, this is not a very consistend UI...

For me, I use "flat view" most of the time. The "show" option varies per project, but is mostly on pending. The context view settings mainly depend on the language I'm writing in or the project I'm working on, but most of the time it's 6 lines, diff parent, ignore \\w.

My gut feeling is that the "view filters" (flat/tree/column; peding/conflict/.../all; #lines; diff parent/merged; ignore \\w) should be project-saved, not global saved.

You would only have to set your preferred settings once (on project start). After that, it would be saved, right?

Then the settings for a new project could be a preference setting? (this is getting out of control !!! ;-)

I'm courious how other people have their settings and handle changes per project (if they do)...

comments: author: stevestreeting
body: Yeah, this is because the default setting is altered when you change it, not based on the last window to close. So the last option you explicitly picked is the default next time. This will not be an issue if the setting is saved per repo.