youngmon/atlassian-qna huggingface dataset:
How do I use git via sudo through Sourcetree?
Asked by Gistya Eusebio:

I want to use git to track my httpd.conf file. However /etc/apache2/ on my system is owned by root, and I want to keep it that way. If I use git from the command line, I can just sudo git ... to do whatever I need. However Sourcetree just throws a "permission denied" error instead of authenticating me. How do I authenticate? If there's no way to do it then please fix this! (OS X 10.11)


Answers:
author: Seth
body: Someone may know a way you can use SourceTree the way you need (I don't, I'm a Windows user). However, if you don't get a useful answer, you might try posting a feature request on jira.atlassian.com, which is the best way to get Atlassian to modify the product. If you do so, please post a link here as an answer so others with the same problem can vote your feature request up.


Tags: authentication
Cannot re-install SourceTree
Asked by Sunny Howe:

I tried to remove source tree because it was extremely slow. I think in order to copy files onto my dev environment, I actually checked them out causing it to be slow.

None the less, now I cannot reinstall. It keeps saying there is a newer version installed and will not install.

I rebooted in safe mode and searched for files and removed them all, but still cannot install.

The set up wizard says "SourceTree setup ended prematurely because of an error. Your system has not been modified. To install this program at a later time, please run the installation again. Click the Finish button to exit the Setup Wizard."

Any ideas?

Thanks,

Sunny


Answers:
author: Seth
body: In Windows, removing files is rarely a safe way to uninstall a program. Installers will often register the application other places in the OS (like the registry). The sourcetree installer may be checking that, and trying to enter some sort of update mode, which fails when it can't find files.

I don't think I can help much here besides identifying the problem. Maybe SourceTree still shows up in the add/remove programs dialog?


author: IgorYastrebov
body: In many cases, the problem is with MSI registry - corrupted reg.

Here is the only tool can fix corrupted MSI registry: <https://support.microsoft.com/en-gb/mats/program_install_and_uninstall/en>


author: Sunny Howe
body: Hi Seth,That worked. I had done an uninstall, but then in retrying, I guess it had placed itself back in there. I uninstalled from control panel and was able to do a fresh install.Thanks bunches.Sunny


author: Sunny Howe
body: OS is windows 8, I did an uninstall, and an reinstall and it was still very slow. So then I started in safe mode and did a search on all source tree files and removed them, Now I can no longer do an install.


author: Seth
body: How did you remove SourceTree? What OS are you using?
api for adding bookmarks?
Asked by cjdawson:

Is there and API that I can use too add Bookmarks to SourceTree?

For background, I have a tool that checks out git repositories and configures them for my developer environment. As a step it would be a nice touch if I could add them to my SourceTree bookmarks.


Answers:
author: Johannes Kilian
body: BTW: There's also missing detailled documentation on configuration of Sourcetree. Having this you might add your bookmarks by manipulation of sourcetree-configuration ...

Doing so, you do not have to run Sourcetree

comments: author: Johannes Kilian
body: On Win-Systems you find the Bookmarks here:{c:\\Users\\XXXX\\AppData\\Local\\Atlassian\\SourceTree\\bookmarks.xml}


author: Johannes Kilian
body: *I'm only familiar with SourceTree for windows - so the answer might be different for SourceTree for MAC*

You can startup SourceTree only with a few different command line options - there is no option to create a bookmark directly:

Run

```
sourcetree.exe --help
```

to see the list of available options.

Running

```
sourcetree.exe -f PATH_TO_YOUR_REPO
```

opens sourcetree and offers to add the new repository to your bookmarks as well .....
Unable to open external merge tool "Meld" from source tree.
Asked by sanatan r:

Hi I am unable to launch the external merge tool "Meld" from the source tree software.

Here is what have in the .gitconfig :

\[mergetool "sourcetree"\]  
cmd = 'C:/Program Files (x86)/Meld/Meld.exe' \\"$LOCAL\\" \\"$REMOTE\\" \\"$BASE\\" \\"$MERGED\\"

trustExitCode = true


Answers:
author: Brendan Simon
body: For merge command try the following arguments.

"$LOCAL" "$BASE" "$REMOTE" --auto-merge --output="$MERGED"


author: Steven Olsen
body: I'm kind of having the same problem. External merge tool is disabled.

<https://crazy4groovy.tinytake.com/sf/NDA0Njc2XzIyMzkyOTI>

[](https://crazy4groovy.tinytake.com/sf/NDA0Njc2XzIyMzkyOTI)In .gitconfig:

```
[mergetool "sourcetree"]
   cmd = 'C:/Program Files/Perforce/p4merge.exe' \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"
 trustExitCode = true
```

comments: author: Seth
body: This is a completely different issue. Based on your screenshot, "Launch external merge tool" is disabled because git thinks the file in question doesn't have conflicts. However, the diff view clearly shows conflict markers in the file.Choose "mark unresolved" from that menu first, then you should be able to launch your merge tool.


author: Brendan Simon
body: This might happen if you have selected to ignore white space. Try not ignoring white space and see what happens.


author: sanatan r
body: Thanks Seth.

I was actually able to make it work using the following :

\[mergetool "Meld"\]   
cmd = 'C:/Program Files (x86)/Meld/Meld.exe' \\"$LOCAL\\" \\"$REMOTE\\" \\"$MERGED\\"  
trustExitCode = true

Looks like adding one more parameter makes the Meld program not show up.

This is in a windows 7 environment .

Regards,

Sanatan


author: Seth
body: <http://stackoverflow.com/questions/11133290/git-merging-using-meld>

You might try without the double quotes.
Github connection error from SourceTree
Asked by Iulia Badea:

Hi there,

I have just installed Sourcetree and am trying to connect it to my Github account, but I am getting an "authentication error" (see image below). I should mention that I have a two step authentication set-up in GitHub (password and authentication code). This is a work account so I can't change that. If this is what's causing the login to fail, is there any way around it?

Capture.JPG

I have read the answers in reply to a similar question, but that's not the same case.

Many thanks!

Iulia  
[](https://community.atlassian.com/t5/Sourcetree-questions/Github-connection-error-from-SourceTree/qaq-p/48108?attachment-id=3094){#link_1169d88584fa14}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/1447/1/Capture.JPG){#display_1169d88584fa14_0}


Answers:
author: Json Marruffo
body: I would check this link out, <https://confluence.atlassian.com/display/SOURCETREEKB/Two-Factor+Authentication+(2FA)+with+GitHub+in+SourceTree>

I use 2-Factor Auth on GitHub and this method works for me.


author: Iulia Badea
body: It worked perfectly! Many thanks!


Tags: github
[Source Tree] ssh-agent.exe unable to start
Asked by n e:

Hi everyone, i got a new computer and try to install Source tree on it but got this error message when i try to launch ssh-agent (Tools\> lauch SSH agent...) :

'ssh-agent' failed with code-1: System.Exception: Unable to to start 'C:\\Users\\myaccount\\AppData\\Local\\Atlassian\\SourceTree\\git_local\\bin\\ssh-agent.exe' check the git installation ()

My former PC runs on windows 7 and my new windows 10. I look in the "bin" folder and there is no ssh-agent.exe there but in git_local i got a usr folder in which i found a new "bin" folder in which a ssh-agent.exe file is.

I tried to :

* change the path but found no way to do so.
* copy-paste the "usr/bin" folder in the "bin" folder but it did not solve my problem.

Please, how can i fix this?

Thanking you in advance


Answers:
author: rrudnicki
body: Hello there,

Looks like SourceTree is looking for ssh on Git Embedded while you are using a System Git. For testing purposes, can you try to change for Embedded Git? You can do this going to SourceTree Menu -\> Preferences - Git.

Cheers,

Renato Rudnicki

comments: author: n e
body: I've tried but it didn't work. I also tried to set again System Git and now it works. Thank you


author: rrudnicki
body: Hello, If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.


author: Robert Swainson
body: After upgrading to version 1.8.1.0 I started to see a similar ssh-agent failure - switching to System Git fixed this for me.
About SorceTree EULA Section 1
Asked by Kentaro Saito:

We would like to use SourceTree for development purpose of our products in our company by accepting End-User License Agreement(EULA) for SourceTree.   
According to SourceTree EULA Section 1 Grant of Licese:  
i) the license is granted for up to 30 days free of charge for evaluation  
ii) after purchasing a siglne license, SourceTree can be used beyond 30 days by a single person on one or more computers.  
On the other hand, your web-site says SorceTree is completly free for busines use.   
Would you confirm that SorceTree can be used for business use without time limit, regardless of the Section 1 (a) of EULA, please?


Answers:
author: Johannes Kilian
body: **Yes, it is free.** For more details ou might have a look here:

<https://answers.atlassian.com/questions/154537>
Please help>_< By mistake I delete a file in source tree and now i wanna recover it!
Asked by SL:

I am going to die my God that's my excel contents so many datas

\>_\< please please help.


Answers:
author: Johannes Kilian
body: Of course you can only recover files from the git repository, when you have commited them - and you are only able to recover the latest version of a file you have commited ...

See for example:

<http://stackoverflow.com/questions/2007662/rollback-to-an-old-git-commit-in-a-public-repo>


author: Seth
body: If the file was not indexed by Git, your OS may provide some recovery tools <http://windows.microsoft.com/en-us/windows7/recover-lost-or-deleted-files>

Or you can try 3rd party apps that will scan your hard drive for deleted data: <http://www.lmgtfy.com/?q=recover+deleted+files>
Can sourceTree keep synchronized with command line changes?
Asked by Mark Harrison:

Many times I have a sourceTree window open on my repo, but I'm also making changes via git command line (git checkout foo, for example). I notice that when I do this, the sourceTree window is now out of sync with my repo state.

1. is there a danger in this? If I do a sourceTree operation, could it break my repo state because I've changed things behind sourceTree's back?
2. Is there a way to tell sourceTree to watch my repo state, and update accordingly? i.e. if I change branches, have sourceTree also change branches?


Answers:
author: Seth
body: There should be no danger, except possibly in some cases where you initiate an action in SourceTree while it is out-of-sync.

You can tell SourceTree to refresh by using the F5 key. If you make a habit of doing this whenever you shift your own focus to the SourceTree window, you should be safe from any possible harm from using an out-of-sync UI.

comments: author: Johannes Kilian
body: I also think there is no danger. SourceTree is almost nothing but a graphical interface - the main work is done by underlying git. So even if SourceTree display is not uptodate and you trigger a git command via SourceTree the executing git process will take "the real situation" into consideration ....


author: Seth
body: Exactly. The "danger" is mainly that the user doesn't know the "real situation", so the outcome of the command may not be what was expected. Git may push a commit that SourceTree wasn't displaying, for example.
gitflow fatal - could not read password... device not configured
Asked by cwaudby:

I've just tried to push a hot fix in gitflow and got the following error:

```
Switched to branch 'master'Switched to branch 'develop'fatal: could not read Password for 'https://cwaudby@bitbucket.org': Device not configuredCould not push to develop from origin.
```

I can push commits OK manually... how can I fix this?


Answers:
author: cespe2a
body: I have the same problem with my Bitbucket account.

Anybody can help us?
SourceTree - lost commit detail window
Asked by imaffett:

I've lost the commit detail window for Source Tree (OS X). I still have the diff for the first file, but nothing to the left. I've tried expanding/collapsing window widths. I deleted the app and removed the preference files and still cannot get it back.

Any tips would be great! I cannot view the full commit info and files anymore.


Answers:
author: imaffett
body: thanks for filing the request. I have the window when I want to make a commit. I can see my files in the tree or list, but I have nothing when viewing a commit. No one else at my office can replicate it.


author: Tim Crall
body: Here, I've entered a Feature Request: <https://jira.atlassian.com/browse/SRCTREE-3262>


author: Tim Crall
body: This is usually a window width issue (I know you said you've tried that already...)SourceTree really needs a View-\>Default View or something, as this happens fairly frequently and can be hard to fix.
Error when opening git bash terminal
Asked by Patrick Nelson:

When I click the "Terminal" button in SourceTree, this funky error message pops up:

**"It has not been possible to start the Git Bash Terminal."**

screenshot1.png

This is on Windows 8 with SourceTree v1.6.23.0. Does anyone have a clue how to fix this? I've tried using embedded and system version of Git with no luck at all. Thanks!

**Edit:** Good advice below. It appears this started in 1.6.23.0 since 1.6.22.0 works for me. For anyone else reading having this issue, just change the number in the download link on the main download page from 23 to 22 and that will workaround this issue in the meantime until they fix it. [Direct link here](https://downloads.atlassian.com/software/sourcetree/windows/SourceTreeSetup_1.6.22.exe).  
[](https://community.atlassian.com/t5/Sourcetree-questions/Error-when-opening-git-bash-terminal/qaq-p/99338?attachment-id=8386){#link_1169d91ca24077}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/2825/1/screenshot1.png){#display_1169d91ca24077_0}


Answers:
author: Thomas Minney
body: Try this suggested solution: <http://stackoverflow.com/questions/33790602/sourcetree-cant-open-git-bash>Haven't come across the explanation as to why a git upgrade is necessary


author: Kerry W. Lothrop
body: Same problem here on Windows 10. Downgrade also worked.


author: Richard kennerly
body: I have the same problem on Windows 7 after updating to version 1.6.23 yesterday. It worked fine on all previous versions. For now, I'll go back to version 1.6.22 and wait for a fix.
Not able to start git bash in SourceTree 1.6.23.0
Asked by Justinas_Jurciukonis:

Hello,

I have just update my SourceTree to 1.6.23.0v and now when clicking on terminal icon I receive error message

*`It has not been possible to to start Git Bash terminal`*

error.png

Any help how to solve that?  
[](https://community.atlassian.com/t5/Sourcetree-questions/Not-able-to-start-git-bash-in-SourceTree-1-6-23-0/qaq-p/70515?attachment-id=4576){#link_1169d92858d92c}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/1945/1/error.png){#display_1169d92858d92c_0}


Answers:
author: Justinas_Jurciukonis
body: **SOLVED:**

Delete your Git from computer. Go to [Git website](https://git-scm.com/downloads), download newest version (newer than 1.9.x) and install it (computer restart may be needed, make sure your Environment Variable for Git is pointing to right directory).

If it's not working, you can always turn on internal SourceTree Git by going **Menu \> Tools \> Options \> Git** and clicking on \`**Use embedded Git**


author: Dirk Weinhardt
body: Same problem here.


author: valentin-cr
body: Same problem here.

It appeared after I updated SourceTree from 1.6.21 to 1.6.23.

Also running system Git 1.9.5.

Git bash working fine from explorer context menu.

comments: author: Jamie Duong
body: I got the same


author: Jesse_Salazar
body: Same problem here.

Being able to use Bash is pretty important.


author: vidi42
body: Same here.

Seems that is not working for Git versions older then 2.x


author: sammy janssens
body: i got the same problem.

i have the correct rights ( can open git bash when using the context menu via explorer )

i'm running System Git Version 1.9.5

comments: author: Koen Vanderstraeten
body: Exactly the same situation here.


author: rrudnicki
body: Hi Justinas,

Can you check if you have right permissions to start Git or if there's some antivirus or policy blocking Git?

Also, can you check if you are running embedded Git or System Git? You can check this going to SourceTree Menu -\> Preferences - GIT

Regards,   
Renato Rudnicki

comments: author: Justinas_Jurciukonis
body: I can start git bash via right-click menu. SourceTree uses system git


Tags: bash

error
Can I have multiple repositories point to the same local directory?
Asked by Ruby:

I have a separate staging and production repositories but there is only one version of the files locally. SourceTree doesn't allow me to add anew repository in the existing directory. Is there any way around this?


Answers:
author: Tim Crall
body: If you are talking about be able to push/pull to different remote copies of the repo, yes, you can do that. That requires you to configure multiple "remotes".

If you're asking about something else, I'm not quite sure what you're trying to do.


Tags: repository
SourceTree hangs on startup
Asked by Aaron Wright:

Whenever I startup SourceTree it just hangs. All I get is a white window with a title bar. After some time it becomes unresponsive. I'm using Windows 10. I've uninstall and reinstalled SourceTree several times, but nothing changes.

This is such a vague problem, that my question is really, how can I start to debug SourceTree so I can at least figure out where to start looking?


Answers:
author: Aaron Wright
body: Turns out I needed to uninstall and then delete the %LOCALAPPDATA%\\Atlassian folder. Then, after reinstalling, SourceTree was much happier. So something in that folder was holding it up.


author: Tom Andr? Vibeto
body: Logfile is at ${LOCALAPPDATA}\\Atlassian\\SourceTree\\sourcetree-details.log , and contains nothing. Hows yours?

I'm having trouble opening Sourcetree after i updated to version 1.6.23, and is also using Win10. But i don't even get a white window. I will try to downgrade.

comments: author: Aaron Wright
body: Thanks for pointing me at the right folder. Just needed to delete it.


author: Dan Puza
body: Sourcetree started hanging for me at the startup splash screen today. This was the fix, to delete the Atlassian folder and reinstall.

comments: author: Dan Puza
body: Uninstalling alone didn't work without also deleting the folder. Until deleting it, the install program hanged the same way at the splash screen.


author: Joe Miglietta
body: Application freezes when a connection to BitBucket host can not be established.


author: Wolfgang Kaiser
body: Same thing happend to my 'Source Tree', hangs every time on startup. Using the latest release (can't tell which release it is since the app always hangs). deleted %LOCALAPPDATA%\\Atlassian however, the app (after reinstall) still hangs after i re-added my repos. Turns out deleting %LOCALAPPDATA%\\Atlassian will remove all app settings (repos etc). i will try going back to a really old version (that i know worked) and if that doesn't work i will look for some other tool, this is a bit too disruptive for me.
authentication failed
Asked by Connie Elim:

I always get authentication failure when trying to fetch/pull from my git.

Here's the failure from source tree:

git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin  
fatal: Authentication failed for '<https://bbsi.visualstudio.com/defaultcollection/_git/BBSIEnterprise/>'

...

I had made sure that the password that I used is the same as my bbsi.visualstudio.com.

How could this be?

Thanks.


Answers:
author: Connie Elim
body: It looks like I cannot use my email address for the user name (it says to use email address, so it was misleading) because of the '@' in there, so it gets confused while figuring out the path to get the repository, I had to change to use an alias for the user name and it now works.


author: Seth
body: Have you tried to use a git command client? If it also has authentication issues, you may need to contact visualstudio.com support.
Delete or merge git history to get rid of old files
Asked by Javier Bullrich:

Hello, one of our developer accidentally added 750 mb of sound files to his commit and pushed this, some time ago. Now we want to delete all his 7500+ files, is there a way to delete the git history or something like that so that we can't make the proyect way lighter(without such files it's size is 30 mbs, with those files in the history it weights more than 20 times it's size!)

Thanks you!


Answers:
author: Tim Crall
body: See this thread: <http://stackoverflow.com/questions/8740187/git-how-to-remove-file-from-historical-commit>

comments: author: windwagon
body: Mentioned in a linked thread is this solution: <https://rtyley.github.io/bfg-repo-cleaner/>
How to create conditional text area
Asked by TheGloryDay:

For example, when taking a survey in ConfluPage,  
There are below selection area.  
Yes  
No  
Other

I would like to be able to type Comment Free Text only when the choice is "Other".  
Is that possible way in conflu function?


Answers:
author: Sayed Bares [ServiceRocket]
body: [@TheGloryDay](/t5/user/viewprofilepage/user-id/3592826)

Are you using Confluence Server/DC or Cloud? are you using an app to collect surveys in Confluence?


Tags: unknown-hosting-type
Trying to edit confluence via editpage.action but is not saving anything
Asked by Vishwapratapjadhav:

editpage.action?pageId=\<page id\> but it does not save


Answers:
author: Rilwan Ahmed
body: Hi [@Vishwapratapjadhav](/t5/user/viewprofilepage/user-id/5303926) ,

Welcome to the community !!

Open the page in View mode and then click **Edit** button to edit the page.

i.e. https://\<baseURL\>/pages/viewpage.action?pageId=\<page id\>

comments: author: Vishwapratapjadhav
body: Hi Ril++wan,++

++the url https://(base url)/confluence/pages/editpage.action?pageId=(page id)++

++above url open till the point and then there is save button to be pressed which is left++


author: Rilwan Ahmed
body: Hi [@Vishwapratapjadhav](/t5/user/viewprofilepage/user-id/5303926) ,

Please try below steps.

1. In edit page, please click "Revert to last published page".
2. Logout from confluence
3. Close all browsers.
4. Login back and open the page.
5. Click edit and trying saving now.

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/277719iC68037704604140D/image-dimensions/227x123?v=v2 "image.png")


author: Vishwapratapjadhav
body: I am trying it with curl command to achieve. Looking for help in the same context not seeking for help via browser frond end


author: Rilwan Ahmed
body: [@Vishwapratapjadhav](/t5/user/viewprofilepage/user-id/5303926)   
Please check if you have edit access to the page.


author: Vishwapratapjadhav
body: Yes access is there already

query is more related any similar tags like ++editpage.action?pageId=\<pageid\> wht further can we pass so it performs action like save submit in the url++


Tags: unknown-hosting-type
How to create a template that will send notification
Asked by Frank Zhang:

Is it possible to create a template so that when a new page is created by using this template, an email notification will be sent to a group?

Thanks.


Answers:
author: Brant Schroeder
body: [@Frank Zhang](/t5/user/viewprofilepage/user-id/4705737) The only way I know to make that work would be to have individuals in the group watch a space and then as pages get created then they will be notified.


Tags: confluence-server

server