youngmon/atlassian-qna huggingface dataset:
Forward slashes are causing me problems
Asked by Chris Rebel:

Sourcetree is having trouble with forward slashes in the git commit messages. I'm getting error messages like the ones below when trying to view these repostories where the head commit has a forward slash.

11/4/12 12:20:27.706 AM SourceTree\[45500\]: 'git log' failed with code 128:'fatal: ambiguous argument 'CR/MM': unknown revision or path not in the working tree.

Use '--' to separate paths from revisions

'  
11/4/12 12:40:27.901 AM SourceTree\[45500\]: 'git log' failed with code 128:'fatal: ambiguous argument 'test/test': unknown revision or path not in the working tree.  
Use '--' to separate paths from revisions  
'  
11/4/12 12:46:07.787 AM SourceTree\[45500\]: 'git log' failed with code 128:'fatal: ambiguous argument 'origin/master': unknown revision or path not in the working tree.  
Use '--' to separate paths from revisions  
'  
I believe this happened once before and blowing away the preferences files worked as a fix, but I would love to know if there is some other way I can address this problem.  
Thanks.


Answers:
author: stevestreeting
body: That's strange, because I and many others use forward slashes in branch names all the time, it's not only always the case for remote branches, but when you're using git-flow, most branches have prefixes with a slash in them.

Please can you provide more details about what version of SourceTree you're using, your repo state and the gitconfig you're using (locally and globally).
How to I sync two GitHub branches?
Asked by Tim Cook:

I have my master branch and I want to get it in sync with my gh-pages branch. How do I do this in sourcetree?


Answers:
author: stevestreeting
body: You have a choice between merging and rebasing, this blog post might be useful: <http://blog.sourcetreeapp.com/2012/08/21/merge-or-rebase/>

Usually, you'll want to merge if these are different branches and they're both visible on GitHub already. In SourceTree, you can use the Merge toolbar button to merge another branch into your current branch (so if you have master checked out, you could merge gh-pages into it), or you can right-click on a branch in either the sidebar or in the log and select 'Merge' to bring that branches changes into your current branch.
Is there any thing like SourceTree for Windows?
Asked by Rick Jensen:

SourceTree is great, but I have users that want something the same in Windows. Does this exist?


Answers:
author: Rajani Karuturi
body: SourceTree for windows is now available


author: MikeL
body: I've found SmartGit which is more than a compensation for SourceTree - not just on the Mac, but also on Windows and sometimes Linux. In some (for me important) areas SmartGit is better (more "smart"), faster and visually less bloated than SourceTree, in other areas SourceTree is a little bit better.


author: James Holmes
body: Is there something important in Sourcetree that is missing in TortoiseGit?

comments: author: Rick Jensen
body: It isn't fully cross-platform (I want to be able to use one tool across environments) and it doesn't let me switch-hit across different vc systems (ie. go between Hg and git with no effort)


author: stevestreeting
body: Not yet, but this is being requested a lot.
Locally hosted Kiln login
Asked by Michael_Hewitt:

We have a locally hosted FogBugz server with Kiln. I have tried a number of incantations for the Kiln URL/username/password in SourceTree, and so far they all fail to work. When I log into FogBugz, the URL I use is "http://group.company.com", where "group" and "company" are place holders for my actual group/company. To log into Kiln, I use the URL "http://group.company.com/kiln/Auth/LogOn". The email and password are the same for both.

I have tried using both of these URLs in SourceTree, as well as the full email and just the username (truncating at the '@' in the email). None of these have worked. Can you point me in the right direction?


Answers:
author: stevestreeting
body: Do you mean the Hosted Repositories screen? The base URL should work fine, but it does require that the Kiln server responds to the API in the same way as the centrally hosted [kilnhg.com](http://kilnhg.com) does (the test environment I use). My details in the hosted projects account look like this:

Host URL: <https://companyname.kilnhg.com>

Username: [steve@companyname.com](mailto:steve@companyname.com)


author: Michael_Hewitt
body: Thank you for the prompt response, Steve. I had been entering the information into the SourceTree setup wizard. In the new SourceTree update, I see that Kiln has been removed from this wizard and replaced by Atlassian Stash. I believe I was misunderstanding the original purpose of this wizard. It is not for local repositories, but rather for hosted online repositories. I will use the local repository functionality to access our source code. SourceTree is working great, by the way!
Git-Flow: Swapping between Feature branches
Asked by Mark Cousins:

Hi

I'm quite new to Git and Sourcetree (so may be being stupid here...let me know if I am) and have been using Sourcetree successfully with differing branches and remerging etc.

If I switch a branch using 'normal Git/Sourcetree'), I need to stash my changes before leaving my current branch. This is good (for me) for (say) two different feature developments. I've now introduced Git Flow and like the concept that it introduces. However, I notice that if I have several Feature branches in development and switch between them, my changes are not stashed and the mods are reflected across each branch, even into the develop branch if I switch to that.

Am I missing something here? I want to be able to switch between different Feature branches and the develop branch and have separate 'source codes' without all modifications being shared across all branches. Is this correct? It seems a bit confusing.

Help and advice appreciated.

Thanks


Answers:
author: stevestreeting
body: SourceTree never actually stashes your changes for you, it tries to keep them as you switch branches unless you say otherwise. This is because sometimes you might start developing something, and then realise you're currently on the wrong branch so want to switch over to do the commit.

If you prefer to stash, you should click the Stash button on the toolbar before switching branches. Or alternatively, you could commit locally and not push the changes - you can always amend the commit before pushing next time. Whichever you're most comfortable with.

comments: author: Mark Cousins
body: Thanks, that's helped. My query then is why does Git insist on Stashing when switching 'normal' branches, but not when switching Git Flow branches?


author: stevestreeting
body: It actually depends on the realtionship between the branches - if there's a direct ancestor for both of them then the switch can occur without stashing.


author: Mark Cousins
body: Thanks. I see.


Tags: git-flow
How to only stash specific hunks (like patch)?
Asked by David Rees:

Is there a way to git stash just specific hunks? It seems to always take all files.

It would be nice that if the user could just stash the staged items (or the unstaged items - your choice). Essentially using the index as the input to --patch.


Answers:
author: Philippe Fremy
body: +1 from me as well. TortoiseHG allows to shelve (the equivalent of stash for mercurial) hunks and lines and it's very convenient.

I know it is already possible to commit only hunks or lines, but I want to only stage working code. The scenario that I am dealing with is the following :

1. I want to add a new simple feature to my code.
2. along with adding the feature I realise that I must modify a deep layer of the software and I go along
3. I get everything to work (compile, unit-tests, functional tests) but now I have too many changes to commit, which are related to different areas of the code.
4. From now on, I am desribing the workflow that I would like to have, not yet available in sourcetree.
5. I want to commit first the changes in the deep layer of the code. I start an interactive stashing, stashing all the hunks not related to the deep layer of the code
6. I now have only the changes related to the deep layer in my working copy. I compile, run unit-tests, run functional tests. I fix a typo here and there.
7. Everything works, I commit
8. I restore my stash of the feature I was working on.
9. I compile, run unit-tests, run functional tests.
10. I commit my feature.

As you see, the important point is step 6 : I need to compile and run the exact code that I am checking in. This is not possible with hunk staging where you are staging something that is in practise not tested isolately.


author: Dirk Weise
body: +1. This would be very useful if you do a codechange unrelated to your current feature and want to keep it for later use.
'Resolve using theirs' not working??
Asked by Didier Malenfant:

Using Sourcetree during a rebade on a local git server, whether I choose 'Resolve using mine' or 'Resolve using theirs' to resolve a conflict, the same file (version) ends up getting written on on my local directory.

Is this normal?


Answers:
author: stevestreeting
body: This is a bug. Logged, will be fixed in the next update hopefully: <https://jira.atlassian.com/browse/SRCTREE-1249>

comments: author: Didier Malenfant
body: I now have 1.5.5. Is this fixed in that release?


author: windwagon
body: The link Steve pointed to indicates that the fix version is 1.5.6


author: stevestreeting
body: Correct, this is earmarked for 1.5.6. I assume you're using the Mac App Store version, which gets updates often several weeks later than the direct version because of Apple's review delay, which is why you didn't have 1.5.5 already.


author: windwagon
body: The link that Steve pointed to indicates that the fix version is 1.5.6.


author: windwagon
body: The link that Steve pointed to indicates that the fix version is 1.5.6.
Sourcetree Bug in DIFF
Asked by Richard Grossman:

Sourcetree Bug in DIFF

Right-click on any local branch that is not checked out and that is not the same as the current branch.

Choose DIFF against current. A list of files that are different will be displayed.

Right-clock on any local branch that is not checked out and that IS the same as the current branch.

Choose DIFF against current. The file list from the previous diff will not be removed and will still show. Should show no files since there are no differences.

This is a HUGE trap for those who unaware of it - can and has caused hours of problems for my team when they don't know about this.


Answers:
author: stevestreeting
body: Well spotted, logged as a bug: <https://jira.atlassian.com/browse/SRCTREE-1243>
Running git-review
Asked by Scott Lavender:

I am trying to create a custom action in Sourcetree to execute 'git review' on a repo with committed changes. The simple script fails to run with the output:

```
review.sh /Users/slavender/git/ci launch path not accessibleCompleted with errors, see above
```

Bash script:

```
#!/bin/bashcd $1git review
```

Any ideas?


Answers:
author: stevestreeting
body: You'll need to specify the full path to review.sh because Mac OS X apps do not inherit your terminal's path. Alternatively you need to add the path to /etc/paths and reboot.

comments: author: Scott Lavender
body: I did that...

![](../../upfiles/Screen_Shot_2012-10-26_at_12.36.47_PM.png)


author: Scott Lavender
body: I even add the full path to git to the script contents... Same error.


author: Scott Lavender
body: Getting closer...

```
review.sh /Users/slavender/git/ci git: 'review' is not a git command. See 'git --help'.Completed with errors, see above
```

git-review is installed and I can execute this command manually from the command line.


author: stevestreeting
body: Does review.sh have the executable bit set?

```
chmod +x /path/to/review.sh
```


author: stevestreeting
body: Since this is a custom extension you'll need to tell SourceTree to use your system version of Git instead of its own. In Preferences \> Git, click the Use System Git button and point to your system git install (it may pick it up by default but just check it's the right path)
How do I easily keep track of the status of Git submodules?
Asked by ronmichael:

In SouceTree (latest version) if I make a change to some code in a submodule there appears to be no indication at all in the main repository of that change. I'd have to remember to open the submodule to see it.

Am I missing something? Is this by design? We're looking at using submodules in some scenarios where the code there will be updated, but I'm afraid without some kind of visual indicator in the root project that people will forget to check in their submodule code changes.


Answers:
author: stevestreeting
body: Oh, and I totally forgot that there's something else - in the sidebar, SourceTree queries submodule state for you and will display an annotation of '...' if there are uncommitted changes, like so:

<br />

If you've committed and haven't pushed, it's an up arrow.

comments: author: Filippo Bollini
body: Is this still true? I am using version 1.9.6.1 under Windows and I see no hint in the SUBMODULES section of the main repo regarding the state of its submodules.

Many thanks,


author: stevestreeting
body: Git actually ignores uncommitted changes to any nested submodules until you commit those changes, at which point it shows up in the parent repo as a change to the submodule commit that you're tracking.

However, SourceTree supplements this by checking if there are uncommitted changes to your submodules when you try to commit or push the parent. This check is optional (you can disable it in Preferences \> Git \> Check submodules before commit \& push) because some people don't like the extra time it takes to check this when you hit commit/push, but it can be very useful in the kinds of circumstances you describe.

So although you won't see uncommitted changes to submodules in the parent repo, you will get reminded about them when you try to commit or push. SourceTree even lets you commit the submodule changes as a nested dialog inside the parent commit dialog when this occurs so you can do it all in one joined-up sequence.

Hope that helps.

comments: author: stevestreeting
body: Just to clarify, the check happens when you confirm the commit / push dialog in the parent repo.
Install SourceTree from AppStore or from direct download
Asked by David Potter:

When setting up my current machine SourceTree was only available from the website, so that's how I installed it. Even paid for a license (and happy to do it). I'm setting up a replacement machine and have to decide whether to go the same route or install from the App Store. The fact that it is free in the App Store makes that a very attractive choice. However, I noticed that the version I'm currently running is 1.5.5.1 but the version on the App Store is 1.5.3. So it looks like the direct download path would give me updates a LOT more quickly. Is that a reasonable analysis? If I want quicker updates, install from the website, if I'm not as concerned about that, install from the App Store?

I suppose this is the bottom line question: How often do you intend to update the app on the App Store?

Thanks,  
***David***


Answers:
author: stevestreeting
body: I **always** recommend the direct version. It receives updates faster, and isn't limited by the App Store rules so we don't have to turn off features like installing command line tools and other useful things that Apple think people don't want.

In any case, we may not be able to post updates in the App Store forever - Apple keep changing the rules and although they accepted 1.5.3 after they added Sandboxing, we have no idea how many additional updates they'll accept beyond this - technically you're only allowed to post bugfixes to existing apps if they don't have sandboxing enabled, but sandboxing breaks a number of features. So, updates may stop on the App Store at any time (they haven't even reviewed any of our updates for a month, 1.5.4 was never looked at and 1.5.5 is now awaiting their pleasure).

The App Store was a great idea, but the latest changes basically break it for power tools, that's why a number of those kinds of apps have left it in recent months.

comments: author: David Potter
body: Thanks for the very complete message. That makes a lot of sense. Thanks for trying the App Store route. I'll download from your site and keep moving :-).
how do i delete my atlassian account
Asked by zhao li:

how do i delete my atlassian account?


Answers:
author: Franci Penov
body: An account was created for me as part of getting a free license for SourceTree. However, there was nothing shown to me about the consequences of creating this account. Seems to me that if this account can't be removed by the user, people should be warned about this _before_ they do it, not discover this _after_ the fact.


author: Nic Brough -Adaptavist-
body: Contact Atlassian support.

comments: author: MA
body: How? If you open a support issue/ticket you have to chose an atlassian product, of which ther is none named "Atlassian ID".


author: Nic Brough -Adaptavist-
body: Select any of them.


author: Jeremy Largman
body: We're working on improving the UX here. We should have a general question category.


author: Nolwennig Guilbert
body: see [answers.atlassian.com/questions/39156987/answers/39995966](http://answers.atlassian.com/questions/39156987/answers/39995966)


author: MA
body: I contacted support (selecting "any of them"), and heard back: According to them it's impossible to delete an Atlassian ID, because they need the accounts for "license auditing" or something silly.

comments: author: Nic Brough -Adaptavist-
body: Actually, that sounds reasonable to me. You'd want to retain basic contact details, otherwise your auditors would be questioning where the money came from. I know of at least one arrest in a company I worked for because someone deleted audit data.

They should be able to mark it inactive in some way though.


author: codywohlers
body: omfg


author: Nic Brough -Adaptavist-
body: You try telling a tax man "some people gave us money for our software, but we've deleted all record of who they were and what they bought". Yes, that's clever.


author: codywohlers
body: figured it out. <https://answers.atlassian.com/questions/44094421> it was for a new account that i made so there was no info to keep


author: Nic Brough -Adaptavist-
body: Yes, that delete the access.


Tags: atlassian-support
delete items from "Bookmark open repositories..."
Asked by Jay Dee:

Apologies if the questions has been asked before.

When I load SourceTree, there are a number of "bookmarked" repositories that automatically open. As far as I can tell, the only way to access the list from the GUI is "File \> Bookmark open repositories...". However, the window that pops up offers no obvious way to remove an item from the list.

How do I remove all repository paths from the list of bookmarked repos opened automatically by SourceTree?


Answers:
author: stevestreeting
body: Actually the windows that open on startup are solely based on what windows were open at last shutdown, so they can be bookmarked repos or just repos which you've manually opened with File \> Open or dragging from Finder on to the Dock icon.

If you don't want SourceTree to open a repo window on next startup, just close the window before you shut down.

comments: author: Jay Dee
body: Thank you! Makes perfect sense.
Modify Commit Message
Asked by Fahim Farook:

Is there a way to modify the commit message for the current commit using SourceTree? Currently, I have to go to the command-line and run the following:

git commit --amend -m "New Message"


Answers:
author: stevestreeting
body: Yeah, you can do this: there's a checkbox at the bottom left of the Commit dialog which says 'Amend latest commit', when you check it the previous message will appear in the box and you can edit it, then hit Commit to modify it. You can even change the contents of the commit if you want (file changes). Obviously make sure you haven't pushed your changes before using this :)

comments: author: Fahim Farook
body: Ah, thanks Steve :) That's exactly what I was looking for. I thought I remembered that being there somewhere but just couldn't find it when I searched ...


author: MikeL
body: IIRC, this command has the disadvantage to also commit staged files. If you want to only edit the last commit message without touching the index or working tree, it will be a little bit more complicated.

comments: author: Fahim Farook
body: You say it will be a "little bit more complicated" but you don't actually mention if it's possible to do so with SourceTree :) And if it is possible, how to do it ...


author: MikeL
body: If you want to change the last commit's message **without** touching the index or working tree, you need to create a temp file, amend-commit this addition, remove the file and amend-commit this removal with the new message.
SourceTree: How can I copy folders or multi-selected files to another folder in the same working copy?
Asked by Felix Collins:

Copying one file at a time is possible but very time consuming and annoying.


Answers:
author: stevestreeting
body: What I do for larger reorgs is do all the actual moving in Finder, then use Add/Remove button in SourceTree, this is the most natural approach.


author: Felix Collins
body: I guess If you know more about HG's tracking of changes then this is natural. I have moved from SVN to Hg recently. Operating on files directly in the filesystem rather than via the RCS is anathema in SVN because you lose the file history. Apparently this is not the case in Hg.
Sourcetree columns in log (branch and node)
Asked by Barry Weinstein:

I do miss something that I see in TortoiseHq. In the graphical log I can display the branch name next to every commit. Also I can display the Node's hexidecimal identifier.

Is it possible that this is an option in SourceTree but I'm just missing it?


Answers:
author: stevestreeting
body: The main reason this isn't included is that having a branch associated with each commit is a Mercurial-only feature, it doesn't exist as a concept in Git. Therefore we display the branch in the commit details but not on the log columns (although you can derive it from the graph of course).

comments: author: Barry Weinstein
body: Hi Steve,

Is the same true for showing a column with the hexidecimal changeset identifier?


author: stevestreeting
body: No - the short SHA is displayed in Git repos in fact (because there is no Revision in Git), in Hg we picked Revision, thinking it was more readable (but you can copy the full SHA via the right-click menu).


author: Barry Weinstein
body: Perhaps an optional concatentation of revision followed by the hexidecimal identifier. This would be the best of both worlds.


author: Dylan Cuthbert
body: The missing branch name makes it pretty difficult to see what's going on when using mercurial (because it is a basic paradigm). It's fine on the branch-filtered view but when you have a team of 30-40 people and about 10 different branches the branch name per revision becomes pretty important to management of the project.