youngmon/atlassian-qna huggingface dataset:
Trouble creating a Mercurial repository
Asked by Chris Laursen:

I'm trying to create a local Mercurial repository and get the following error after clicking 'Create':

```
hg init -y /Users/digitaluser1/Sites/base/contentTraceback (most recent call last):  File "/Applications/SourceTree.app/Contents/Resources/mercurial_local/hg_local", line 33, in &lt;module&gt;    mercurial.util.setbinary(fp)  File "/Applications/SourceTree.app/Contents/Resources/mercurial_local/mercurial/demandimport.py", line 106, in __getattribute__    self._load()  File "/Applications/SourceTree.app/Contents/Resources/mercurial_local/mercurial/demandimport.py", line 78, in _load    mod = _hgextimport(_import, head, globals, locals, None, level)  File "/Applications/SourceTree.app/Contents/Resources/mercurial_local/mercurial/demandimport.py", line 47, in _hgextimport    return importfunc(name, globals, *args)  File "/Applications/SourceTree.app/Contents/Resources/mercurial_local/mercurial/util.py", line 69, in &lt;module&gt;    statfiles = getattr(osutil, 'statfiles', platform.statfiles)  File "/Applications/SourceTree.app/Contents/Resources/mercurial_local/mercurial/demandimport.py", line 106, in __getattribute__    self._load()  File "/Applications/SourceTree.app/Contents/Resources/mercurial_local/mercurial/demandimport.py", line 78, in _load    mod = _hgextimport(_import, head, globals, locals, None, level)  File "/Applications/SourceTree.app/Contents/Resources/mercurial_local/mercurial/demandimport.py", line 47, in _hgextimport    return importfunc(name, globals, *args)ImportError: dlopen(/Applications/SourceTree.app/Contents/Resources/mercurial_local/mercurial/osutil.so, 2): Library not loaded: /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics  Referenced from: /Applications/SourceTree.app/Contents/Resources/mercurial_local/mercurial/osutil.so  Reason: image not foundCompleted with errors, see above
```

I've got SourceTree 2.0.5.2 and OS X 10.7.5


Answers:
author: Chris Laursen
body: I figured it out. Even though SourceTree 2.0.5.2 is compatible with OS X 10.7.5, the embedded version of Mercurial is NOT. This seems like a mistake on SourceTree's part, they should offer a different download for 10.7 people that includes an older version of Mercurial.

Anyway, to fix this, I installed Mercurial 3.2.1 (<https://mercurial.selenic.com/downloads>) and in SourceTree preferences I told it to use that version of Mercurial instead of the embedded one.
how to rebase interactively
Asked by Daphne Maddox:

I've used SourceTree before and sometimes had this problem, but now it seems to be stuck in this "state":

I cannot rebase interactively. When I select a commit on my active branch and choose "Rebase children of (the commit) interactively.." nothing happens.

How can I resolve this?

Thanks,

Daphne -- OSX 10.10.3, SourceTree Version 2.0.5.2 (2.0.5.2), git version 2.3.2 (Apple Git-55)

P.S. Same problem with Embedded Git, by the way.

<br />


Answers:
author: David Banks
body: Try navigating to the repo using the bash. If you type \`git status\`, does it give you any clues? e.g. are you in the middle of a rebase, or a merge?


Tags: git

rebase
file view is missing
Asked by M Saehn:

hej,

in the log view, when i click on "uncommitted changes" there is below the commits-list on the left side a file-view and on the right side the dif of the file.

but when i select an other commit than "uncommitted changes", than there is **no** file-view. but in the last months there was. (and is was possible to see all the changed files in the commit...) i tried to reinstall the app, but nothing changed ![sad](/html/@C495B4504065515364EB1894F812B34C/images/emoticons/sad.png "sad")

please help, thanks.


Answers:
author: Bal?zs Szakm?ry
body: Not sure about the mac version, but the Windows version has this little tab selector on the bottom with these options: File status / log/history / Search. If you have this too, try switching tabs on it.

Also, check if you have some sub-window collapsed to 0 width/height. (I think this will be your problem.)

comments: author: M Saehn
body: thanks. you are right, the problem was,that the sub-window collapsed to width=0. i don't know why, but now i can see the files again. so thank you very much.


author: Nick Miller
body: The File status / long history / Search tabs have disappeared for me. Do you know how I can get them back?

I'm not sure how to check if I have a sub-window collapsed to 0 width/height


author: peter.thiem
body: My tabs are missing, but the same functionality in top left menu items. Enterprise version, circa right now.

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/72817i1522FF27FEE70A92/image-size/large?v=v2&px=999 "image.png")


author: M Saehn
body: nobody has an answer? i use sourcetree 2.0.5.2 on the mac. isn't there any possibility to reset the whole app?
Entire Commit Lost in SourceTree after Pull with rebase instead of merge
Asked by Arthurial:

Hello,  

I'm trying to recover a commit that was lost after an unsuccessful merge after pulling (with the rebase instead of merge option checked). Admittedly I'm not entirely sure about this process, as I was instructed to use it to avoid large merged commits, and that's why I'm in this mess.  

After there was a conflict, I clicked 'Continue Rebase' by mistake instead of Abort, and consequently it has wiped out a lot of work. I'm using SourceTree's inbuilt version of GIT.

I would appreciate your assistance in recovering my work, since the commit is now entirely gone from this GUI's history.  

Thank you,


Answers:
author: Arthurial
body: Thanks Balazs. Luckily git hadn't deleted the commit. I managed to find and recover it using the terminal and perform a hard reset to restore my lost work.  

For reference:

1. Open the Terminal in the Actions menu.
2. Type **git reflog** - this will display your recent history with ids for each git action.
3. Type **git reset --hard your_lost_commit's_id**- but this will wipe out all changes since that commit.

comments: author: Adri? Mar?
body: This saved 2 very productive hours of work and made my day. Thank you.


author: David Avila
body: This happened to me today and this answer fixed it for me.


author: dascoba
body: This saved 2 days of work that I thought was lost.. Thanks!!!


author: SynthWeaver
body: THANKS


author: Sandeep Mamdikar
body: This saved 2 days of work that I thought was lost.. Thanks!!!


author: Madhur Bhargava
body: This saved me and my colleague from couple of hours of work and a million tears


author: Michael_Kushniriov
body: by the way if there are other commit maid after your lost commit, you can create a branch from this one and that way "clone" the existing branch. Then follow the steps suggested by Richard, and have your branch safe and sound with new name (of the newly created branch).


author: RamyaSri
body: Thank you so much [@Arthurial](/t5/user/viewprofilepage/user-id/690303).. Your answer saved me a lot ..


author: MinhHieuDL
body: Thank you, your answer saved my day!


author: eliteforcevn
body: Thank you you saved my works


author: Michael Litner
body: Thank you. This saved half a day of my work!!!


author: Bal?zs Szakm?ry
body: Check if you have .orig, .bak or similar files left by your merge tool. If yes, you can use these. If not, there is not much you can do, unless the server or some other person's clone has the original commit.


Tags: windows
Build the wrong feature
Asked by Hui Zhao:

My current feature is ISSP-80 in Source Tree. The previous one is ISSP-79. When I build the solution, there is always a ISSP79 subfolder in src\\packages. It is supposed to be ISSP-80.

Even I delete the subfolder, it appears again after I build it. I guess it is Git issue, maybe it downloaded the wrong ref from remote server?

I checked the HEAD log file under .git\\logs. The first two lines are:

0000000000000000000000000000000000000000 9454ea84e7d75c4502a3999de90911c55f97e114 Somebody \<[sz@huiz-desk.corporate.my.com](mailto:sz@huiz-desk.corporate.my.com)\> 1431691933 -0400 clone: from <https://bitbucket.org/my/logprovider> 9454ea84e7d75c4502a3999de90911c55f97e114 6653f62abf3aabe896171bdcfb25cc3969f1d756 Somebody \<[sz@huiz-desk.corporate.my.com](mailto:sz@huiz-desk.corporate.my.com)\> 1431691958 -0400 checkout: moving from master to feature/ISSP-79


Answers:
author: sreekumar_menon
body: just curious, what does build have anything to do with sourcetree?

comments: author: Hui Zhao
body: There is no proper tag for that on the web site. But I think that if anything related to GIT?
Which is 'mine' and which is 'theirs' with conflicts when finishing release using Sourcetree git flow?
Asked by Nathaniel Wales:

I'm using git flow and I finished a release and I have a merge conflict. I'm having a very hard time wrapping my head around which file is 'their's' and which is 'mine'. Ultimately what I want to know is which version of the file is from the 'develop' branch and which is from the 'release' branch.


Answers:
author: JM
body: "Mine" and "theirs" is fundamentally confusing. What if you're merging two branches that you didn't even work on? Then neither is yours. Or what if you're rebasing your own branch? Then they're both yours.

Instead, it would be better to identify the actual commit it's coming from. Commit hash would work. Maybe a branch name can be shown in some cases. Regardless, it's a horrible choice of words.

comments: author: skumancer
body: This is what we should have!


author: nscherer
body: "Mine" is develop, and "Theirs" is the release (feature, hotfix) branch. You can tell which is which because if you look at the graph, your working copy is in the develop branch, and the release branch is being merged to it. So "mine" is develop. Also it will ask for confirmation and give you the commit id. Branch names would be much better than "mine" and "theirs" though.

comments: author: yagni
body: Just to clarify, this is the same regardless of whether you're rebasing or merging. The confusing part is that if you're rebasing, you initiate the operation from the release branch, whereas the merge is initiated from develop.


author: sreekumar_menon
body: This is the most confusing part of sorcetree. Mine and theirs naming are actually confusing and does the opposite of what it means,according to me.

Picking "Resolve using mine" (changes on my branch that I'm merging into) actually results in SourceTree picking the file AS IS on the source branch (the one i'm merging from).


Tags: moderators
SourceTree - how hide staged/unstaged view
Asked by tarling:

One of my repos has the working copy split into staged and unstaged files as per the screenshot - the other's don't. I can't find a setting to not use the staged/unstaged view. Does anyone know how to stop it, please?

Thanks

Screen Shot 2015-06-19 at 10.11.52.png  
[](https://community.atlassian.com/t5/Sourcetree-questions/SourceTree-how-hide-staged-unstaged-view/qaq-p/436691?attachment-id=11278){#link_1173efa7bf5a7b}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/13067/1/Screen%20Shot%202015-06-19%20at%2010.11.52.png){#display_1173efa7bf5a7b_0}


Answers:
author: sreekumar_menon
body: sree.png

Check if it is set to split view staging?  
[](https://community.atlassian.com/t5/Sourcetree-questions/SourceTree-how-hide-staged-unstaged-view/qaq-p/436691?attachment-id=12701){#link_1173efac8d6b24}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/13068/1/sree.png){#display_1173efac8d6b24_0}

comments: author: tarling
body: Thank you - I missed that option completely.


author: Chris Ellepola
body: sree.png can't be viewed anymore it seems - see Robin_Gare Answer.


author: Robin Gabre
body: If the image from the other answer cannot be loaded:

In the when showing the 'File Status' window there are 2 drop-down menus just over where the changed files show up.

The first one is for sorting options, and the second one if for how to display the files.

The second menu looks like a hamburger-menu and where you can select:

'no-staging'

'fluid-staging'

'split-view-staging'


author: mehrantm
body: It shows the staging panel when I choose it however the familiar button to stage files is missing
SourceTree keep suddenly jump back to staged files even I click on some unstaged files
Asked by Aludirk Wong:

When I click on an un-staged file in working copy to view the diff, it always suddenly jump back to a staged file, after I click back to the un-staged one, it jump back again, I need to make few try to make it stable on the one I chose, does anyone have same issue ?


Answers:
author: Bal?zs Szakm?ry
body: This might be caused by the refresh caused by the background fetch.

You can switch it on/off at Tools\\Options\\General\\Check default remotes for updates every N minutes. (On Windows)

comments: author: Aludirk Wong
body: It keeps the default setting 10 mins already :(I found that every time I stage a file, it will try to refresh the just staged file, and after it is refreshed, SourceTree will jump to that file. In the mean time when refreshing, if I click to see other files, then it will suddenly jump back to that file after finished refreshing and then try to refresh AGAIN, so if I try to click other files at this moment, whole thing is keeping in a dead loopI even try to uncheck "Refresh automatically when files change", but no use :(
compare branch to master
Asked by Markus:

how can i compare two branches. lets say my working dev-branch to master or master to origin/master.

i can do this with git command line but how can this be done with sourctree. is it possible to have this in also an external diff tool? filemerge can handle a "directory diff".

i sometimes want to have the external diff to view the complete file and not only the "differences"

markus


Answers:
author: Tim Crall
body: Use control-click or command-click to select any two commits (so both are highlighted at the same time)

The window in the lower left shows you a list of all files that were different (added, deleted, or modified)

You can select a file from that list to see the specific changes in that file between the two selected commits.source_tree_diff.png

You can also configure a third party diff tool, but the built-in functionality has met my needs so I don't have any experience with that.

[](https://community.atlassian.com/t5/Sourcetree-questions/compare-branch-to-master/qaq-p/363851?attachment-id=5931){#link_116a33f8968301}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/10847/1/source_tree_diff.png){#display_116a33f8968301_0}

comments: author: scott morgan biggs
body: Hmmm, I know this is really stale, but I just started using souretree. This shows how to compare two commits, but the OP asked for difference in branches. How do you know which commits to click on?


author: sreekumar_menon
body: You can select 2 commits (cmd click) and compare in sourcetree. to compare 2 branches select the tip of the branches in log view , you can do the same for local and origin too.

But I usually use terminal since it is easier .
Merging from branch deletes files added to master
Asked by Anthony Hughes:

New to SourceTree and GIT branching...

We have a git repro where all the main development happens along the master trunk, but some time ago a separate branch was created for some experimental work. I'm now trying to merge that branch back into master with SourceTree but having a major problem where all the files that have been added to master since the other branch was created (and don't exist in that branch) are being flagged as deleted from master.

Here's what I'm doing

* Make sure master is checked out
* Select the latest commit on master
* Click Merge
* Select the most recent commit of the other branch
* Click OK

The result is a bunch of conflicts as expected, but also a mass of "deleted" files that really should not be!

What's going on??

Thanks


Answers:
author: Peter Schueffler
body: I think you can avoid that issue by following practice:

before you merge the branch into the master, you go to your branch and pull from the master (applying the latest changes, new files etc). Then you resolve conflicts on your branch, then you merge to the master.

Even if your branch has a wired past, it will then know what the master should be and just apply the current differences, instead of wired past differences.


author: sreekumar_menon
body: what you need to do is a simple merge from your branch to master. no need to select a commit.

This is what I do.

checkout master branch in sourcetree.

right click on your other branch (on left tree) and select "merge branch into current branch" . current branch is master .

and it should merge all changes from other to master.

comments: author: Anthony Hughes
body: Thanks for the tip - unfortunately this give me exactly the same result as before ![sad](/html/@C495B4504065515364EB1894F812B34C/images/emoticons/sad.png "sad")


author: Anthony Hughes
body: Ok I've found out a bit more - there was a merge of the master into the branch at one point in the past, but shortly after that a revert to a commit before the merge (don't ask me why). Selecting this revert shows all the files that we new in the master as to be deleted in the branch.

Any attempt to merge the branch into master after this point causes the master files to be deleted.

How do I get out of this mess?


author: sreekumar_menon
body: so you are saying there is a commit that reverts the newly added files ,which is removing the newly added files.

you could revert that commit again\*(commit that is reverting ),which will put all the files back.


author: Anthony Hughes
body: There was a commit (some changes) then a merge with master, then the commit was reverted, which also removed all of the files added by the merge because it happened after the commit that was being reverted. As well as removing new files, this revert also undoes the changes in master that had happened up to the point of the revert.
Is there any way to show revision column?
Asked by Sebastian Kroszka:

For example next to Commit column


Answers:
author: Bal?zs Szakm?ry
body: You cannot change which columns are displayed in SourceTree.

comments: author: Sebastian Kroszka
body: Will this feature be available in the future?


author: Bal?zs Szakm?ry
body: Search for this in <http://jira.atlassian.com> and create a feature request if you cannot already find one. Post the link to the Jira item here in a comment so others can vote for it too.


author: sreekumar_menon
body: what is revision in git, I thought the commit id is the revision.?
Emoji on Sourcetree commit messages
Asked by caipivara:

Is there a way to enable emoji on commit messages?

github supports it.

for instance ":muscle:" must show an arm.

Screen Shot 2015-06-17 at 10.29.06 AM.png  
[](https://community.atlassian.com/t5/Sourcetree-questions/Emoji-on-Sourcetree-commit-messages/qaq-p/373884?attachment-id=7533){#link_116a343cb965f0}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/11132/1/Screen%20Shot%202015-06-17%20at%2010.29.06%20AM.png){#display_116a343cb965f0_0}


Answers:
author: William Zanchet [Atlassian]
body: Hi Daniel,  

I just created a feature request for you as you can see here:  

<https://jira.atlassian.com/browse/SRCTREEWIN-3303>

I would strongly suggest that you vote on this issue to increase its popularity and add it to your watchlist for future updates.

Cheers,  
WZ


author: Seth
body: As a user, no.

You can request a feature at jira.atlassian.com


author: NeLk42
body: There's two JIRA tickets requesting that feature already, vote them up and give them some publicity :wink:

<https://jira.atlassian.com/browse/SRCTREEWIN-3072>

<https://jira.atlassian.com/browse/SRCTREEWIN-3303>
SourceTree repeatedly losing track of index.lock
Asked by Simon Watson:

Every time I try to make a change in my branch, SourceTree creates an index.lock file in the .git directory, then refuses to make the change because an index.lock file exists. Deleting the lock file doesn't help, as SourceTree will just create it again. Any suggestions?


Answers:
author: Mikel Kew
body: I'm also seeing this VERY frequently in 2.7.6 (macOS 10.12.6). Has being occurring intermittently for quite a few versions now. Seems to be most common for me when the system is under high CPU load from other processes.


author: emlynb
body: I still see this on 2.7.1 on macOS very regularly. I think it's a race condition somewhere in source tree as sometimes it causes it and sometimes it can sort itself out.

I have had success with closing sourctree and deleting .git/index.lock from the command line


author: antonytm
body: Getting this in v2.4.7.0 on Win10 time to time.  
SourceTree creates and removes git.lock file repeatedly.


author: Dune C
body: Getting this in v2.4.7.0 on Win10.

Edit: It started working again right after I posted this so I think it's an intermittent issue.


author: swendrich
body: Same here with 2.7. That really sucks! Atlassian please fix it. That would save my x-mas days.


author: Thomas Vogelpohl
body: I have the same issue with 2.6.3.

It is annoying to delete index.lock by hand after every activity.


author: Giancarlo Berner
body: I just did an update to 2.6.3 and the index.lock issue is back again! It seems that Sourcetree creates the index.lock, then does the commit or whatever task you trigger, and at the end does not delete index.lock anymore. I manually have to delete index.lock every time I trigger an action. When will this be fixed?


author: Wayne Tan
body: Still a problem in v1.9.6.2, especially interactive rebase. Please vote on this issue to get someone working on it: <https://jira.atlassian.com/browse/SRCTREEWIN-5639>


author: Gil Shapir
body: Ditto - same exact issue.


author: howellcc
body: Ditto. Let me know if anyone finds a solution.


author: Steven A.
body: i see the same thing after i tookthe sourcetree update.
Why has Sourcetree become so dreadfully slow when executing git operations?
Asked by Martin Wunderlich:

Hi,

I quite like working with SourceTree, however, recently it has become a major blocker for my work. Any operation that involves some kind of git operation seems to be very slow. Examples are: Staging files, making a commit, building the branch view etc. Often the progress icon will rotate for several minutes in the index panel after staging a file before I can continue to work. This leads to a frustrating user experience when trying to get my work done. I am on version 2.0.5.2 and Mac OS X Yosemite (10.10.3).

Cheers,

Martin

j


Answers:
author: Martin Wunderlich
body: No anwers? Pity. I will resort back to command line then and start looking for a sourcetree alternative.


author: Martin Wunderlich
body: PS: This here is the message I keep getting when I try to run any other operation while the progress icon is showing:

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree -c sequence.editor='/Applications/SourceTree.app/Contents/Resources/stree_gri' -c core.editor='/Applications/SourceTree.app/Contents/Resources/stree_gri' rebase --continue

fatal: Unable to create '/Users/marw/Documents/workspaceDev_fix/censhare-product/.git/index.lock': File exists.

If no other git process is currently running, this probably means a

git process crashed in this repository earlier. Make sure no other git

process is running and remove the file manually to continue.

Applying: \<commit msg\>

Completed with errors, see above


Tags: performance
Remove newly added cloned repository from my working directory
Asked by Margaret Ames:

Hi,

I recently added a clone to my working directory need to delete it. How do I remove the clone repository in source tree from my working directory? Thanks, Margaret


Answers:
author: childnode
body: tip for the next question: please set the correct tags: it's not about #confluence neither #confluence-development but #sourcetreethank you


author: Pepe
body: Window -\> Show Repo Browser

Right click and select Delete

You can also just delete the repo directory from your computer and sourcetree will notice that its gone and ask if you want to removed the reference to it.