youngmon/atlassian-qna huggingface dataset:
change several files to state of remote
Asked by Michael Mossey:

I tried to pull from a remote server and merge conflicts on two files which I'll call A and B. Except I realized afterward that all I really wanted to do is choose the remote version of A and B and discard my local version.

I think I messed up the merge and I just want to discard what I have now and change to the current state of the remote versions.

Apparently I'm 4 commits ahead of the remote, but I don't want to push yet until I've resolved this.

Here is a screenshot of SourceTree. What can I do to resolve this; i.e. change my two files to the remote versions before I commit and push?

![sourcetree.png](/t5/image/serverpage/image-id/35526iB5A332F89DA2214A/image-size/large?v=v2&px=999 "sourcetree.png")


Answers:
author: minnsey
body: Hi  

I would reset my local repo to match the remote, effectively deleting the failed merge.  

From the command line, something like this  

    git fetch origingit reset --hard origin/master

, In Sourcetree for Windows, select the correct commit from the remote in the Log View, Right click and then select *Reset to this commit* and then choose the *Hard* option


Tags: git
Installer blank Atlassian login window
Asked by noonoox123:

To be more precise, after waiting for about 5 minutes with a blank screen, I see:![Capture.PNG](/t5/image/serverpage/image-id/35518i2291CDFA82EF92C9/image-size/large?v=v2&px=999 "Capture.PNG")

Refreshing the page does literally nothing (as in.. doesn't refresh the page) and I am unable to open dev tools w/ F12 to see what's going on.

I'm perfectly able to access and login to id.atlassian.com via the actual IE client, but Sourcetree's installer window just does not work.


Answers:
author: noonoox123
body: I was experiencing issues on a previous installation where sourcetree would authorize my bitbucket account but then say that it was an incorrect username/password when actually pushing (no matter how many times I'd reload the client or re-auth), so I completely uninstalled it to attempt a fresh install. A.k.a, I do not have previous login files to reference


Tags: install

login
Source Tree License
Asked by Jason Simon Thomas:

I recently was approved for a student license from Atlassian but I'm not sure which one is for source tree in particular. I see (Fisheye, Crucible, bitbucket, Bamboo, Crowd, multiple Confluence licenses, and multiple Jira licenses). non of them say source tree. What do I do about all this? and what are these other licenses for?


Answers:
author: Mikael Sandberg
body: Hi Jason,

Welcome to the Atlassian Community.

Sourcetree does not have a license, all you need is an Atlassian account in order to use it. See [Install Sourcetree](https://confluence.atlassian.com/get-started-with-sourcetree/install-sourcetree-847359094.html) for more information.
The ... button on staging item is too small for clicking on macOS Mojave
Asked by juniperphoton:

I am using the latest version of SourceTree 2.7.6 for macOS.

An image may describe this best, see where the arrow points to:

![Snipaste_2018-10-19_10-41-41.png](/t5/image/serverpage/image-id/35414iFA5C481D90966A3F/image-size/large?v=v2&px=999 "Snipaste_2018-10-19_10-41-41.png")

This issue appears after I upgrade to macOS Mojave.


Answers:
author: bgannin
body: Please file a ticket in [https://jira.atlassian.com/browse/SRCTREE](https://jira.atlassian.com/browse/SRCTREE/) for us to track. Thanks!


Tags: mac
Having trouble merging a master into my fork, please advise
Asked by Avrohom_Yisroel_Silver:

Warning: Brand new SourceTree user, and inexperienced GitHub user!

I forked someone else's repo on GitHub a few weeks ago, and have made some changes to my fork.

However, since then, commits have been made to the master repo, and I now want to pull those changes to my fork. However, I cant seem to work out how to do this.

I had a look at [the docs](https://confluence.atlassian.com/get-started-with-sourcetree/merge-changes-from-one-branch-to-another-git-847359121.html), but what they show bears little relationship to what I see. Don't know if that's because I'm on Windows and that page mentions MacOS...

![1.png](/t5/image/serverpage/image-id/35400iE869673C78CC9C3C/image-size/large?v=v2&px=999 "1.png")

Anyway, I clicked on Working Copy, as that's my fork, which is behind the master,and then clicked the Merge button. This gave me something that looked like in the docs. However, the commit graph (which looked the same as the bit you can see above) only showed commits on the master repo up to the point where I last got a copy of the files. None of the commits since then show up.

I tried clicking the OK button to see if it would pull anything from the master, but nothing happened.

Anyone able to help me? I need to get my fork up to date with the commits that have been made to the master repo since I last got the files.

Thanks


Answers:
author: Avrohom_Yisroel_Silver
body: Hello,

Thanks for the reply. It turned out that I hadn't added the master repository to SourceTree, so it could only see my fork on GitHub and my local copy. Once I added the master, I was able to grab the latest.

Thanks again

comments: author: Ana Retamal
body: Glad you figured it out! Have a great day :)

Ana


author: Ana Retamal
body: Hi Avrohom, welcome to the Community :)

In this case you don't need to merge the branches, what you need to do is to pull the changes from the main branch to your fork. Have you tried that already? To do so:

1. Click on the "Pull" button on the toolbar. A Pull window should appear.
2. Select the remote to pull from.
3. Select the remote branch to pull changes from.
4. Click "OK" to pull changes from your remote repository into your local working directory.

Let us know if this helped you!

Kind regards,

Ana


Tags: git

github

windows
SourceTree installation Windows - unable to login to Atlassian server
Asked by Jeff Maze:

When attempting to install Sourcetree (2.6.10) on a Windows Server 2016 VM, the process gets hung up on the 'Login to Atlassian account' step. We have verified we have a valid account and are able to login to the atlassian website without issue. We have disabled Symantec and tried a few other ideas seen on the web but without success. Can someone provide any insight into getting past this step so we can finish the install and start using? Thank you.


Answers:
author: Ana Retamal
body: Hi Jeff, welcome to the Community!

Are you getting any error message or it just hangs? Can you verify if you have the latest version of Internet Explorer? Sourcetree relies on it for the authentication and will fail otherwise.

Best regards,

Ana

comments: author: Jeff Maze
body: No error message, it just hangs on logging in screen (shown below). The VM is running Windows 10 and we are using the latest version of IE (11.2485).

![Screen Shot 2018-10-18 at 4.32.18 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/35587i43F45EB244E74CA9/image-size/large?v=v2&px=999 "Screen Shot 2018-10-18 at 4.32.18 PM.png")


Tags: windows
How to log in during windows installation ...
Asked by Frederic MONCLAR:

Starting a new installation of SourceTree on windows PC (Windows10), I'm getting error : Log in to continue - Log in with Atlassian account Something went wrong while attempting to validate your credentials.

I've got an answer from support : If you're on Windows, make sure you have Internet Explorer updated to the latest version, as Sourcetree relies on it for authentication.

I've got the folowing version of Internet Explorer and Edge navigators nad I can't update them because I'm not administrator.

Is there a solution to log in or to bypass login when it is not possible to update my browsers ?

Fred

![atlassian-02.PNG](/t5/image/serverpage/image-id/35346i955C8A71A77DD7D5/image-dimensions/236x98?v=v2 "atlassian-02.PNG")![atlassian-01.PNG](/t5/image/serverpage/image-id/35347i3BC5778F2646EDE8/image-dimensions/162x124?v=v2 "atlassian-01.PNG")


Answers:
author: Ana Retamal
body: Hi Frederic!

Can you confirm you're using your Atlassian account to register Sourcetree?

Can you try to log in to [id.atlassian.com](https://id.atlassian.com) using Internet Explorer with the same credentials and see if you get any error?

Let us know!

Ana

comments: author: Frederic MONCLAR
body: Hi Ana,

Thanks for your answer.

I did a test on all browsers that I have and I confirm that I can log in with my attlasian account everywhere. There is no error at all.

![Capture-attlasian-01.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/36935iC29B2F06F0E7107E/image-size/large?v=v2&px=999 "Capture-attlasian-01.PNG")


Tags: windows
Can analytics in Sourcetree Enterprise be disabled?
Asked by Gregg Deuchar:

My company does not want program analytics being sent out to external companies. Currently, each user can choose whether to "Help improve Sourcetree by sending data about your usage". I'd need to disable this globally, ideally through a config file, Registry key or GPO.

If none of those options are possible, there are 8 DLLs with "analytics" in their name in the Sourcetree folder, but don't know if I can safely remove any of them to accomplish my goal.

Is it possible to disable analytics?


Answers:
author: minnsey
body: Hi  

Don't remove the dlls, although Sourcetree is quite well componentized that will stop Sourcetree starting at all.  

That analytics submission is controlled via the *AnalyticsHasAgreed* setting in the user.config.  

You can either force this to **false** in the sourcetree.exe.config of the install before the first run, or after it has run atleast once by setting it in the %localappdata%/Atlassian/Sourcetree.exe_url_{hash}/{version}/user.config file  

<br />


Tags: analytics

sourcetree-enterprise
update files
Asked by Waleed Khattab:

Hello ,   
I have " project A" and "Project B",  
Project B it's copy from Project A (migrate A to B), Project A always Updating and project B Updating also but from different team ,  
So , my problem is when i want Apply the update from Project A to Project B   
**Without** effect on Project B updated code .  

Any solution ?


Answers:
author: minnsey
body: Hi  

If I understand correctly, you want to pull some changes from Project A into your Project B but without that change being permanent?  

If so I think I would either

* Create a patch of the required code in Project A and apply it to a local copy of project B

Or

* Add Project A's remote to my local copy of Project B and cherry pick the commits I wanted from A branches into B

Then when finished simply reset my local copy of project B to match the project B remote, something like this:  

    git fetch ProjectBgit reset --hard ProjectB/master


Tags: migration
Git Credential Manager for Windows Popups in v3.0.6
Asked by Alan Cordner:

I see other older posts regarding this, but after updating to v3.0.6 recently, I am getting VERY frequent prompts to enter credentials for an old stash (Bitbucket Server) URL that is no longer in existence. I cannot find any place where the URL to this old server is referenced. None of my repos in SourceTree reference it and the Authentication tab in Options does not reference it.

Prior to updating to v3.0.6 I was not getting this prompt. I am currently using embedded Git.

Where should I look to get rid of this reference?


Answers:
author: minnsey
body: Hi   

An updated GCM has been released which fixes an issue which is one cause of these frequent popups.  

<https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases/tag/1.18.3>  

I'd strongly recommend up grading


author: minnsey
body: Hi  

Can I ask how you know it is referring to an old Stash instance? The GCM does not usually show information about the remote host, one of its more frustrating aspects.

comments: author: Alan Cordner
body: It shows the URL on the dialog.

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


author: Alan Cordner
body: I did find a reference to this URL in the local passwords file:

%localappdata%\\Atlassian\\SourceTree\\passwd

I removed the entry from this file, but that has not stopped the prompt from appearing.


author: Alan Cordner
body: So I updated to v3.0.8 today, and in addition to the dialog above I am also getting this dialog:![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/35760iA6511A7823C10A84/image-size/large?v=v2&px=999 "image.png")


author: Alan Cordner
body: Another question is where did the v3.0.x versions come from? According to the SourceTree download page, the latest release for Windows is v2.6.9.0


Tags: windows
Cannot access repository
Asked by Phil Penny:

I have the following user settings:

![Screenshot 2018-10-17 at 13.29.25.png](/t5/image/serverpage/image-id/35199i31469209E08294CD/image-size/large?v=v2&px=999 "Screenshot 2018-10-17 at 13.29.25.png")

I have the following branch permissions set up:![Screenshot 2018-10-17 at 13.29.10.png](/t5/image/serverpage/image-id/35198i4F75F047A693204B/image-size/large?v=v2&px=999 "Screenshot 2018-10-17 at 13.29.10.png")

Ryan Grosso should therefore have access to write directly to dev and merge to it via a pull request, and access to merge to master via pull request.

However, when attempting to clone via SourceTree, he gets the following error:

![screenshot_2018-10-17_at_13.35.42.png](/t5/image/serverpage/image-id/35204i85B9561317871948/image-size/large?v=v2&px=999 "screenshot_2018-10-17_at_13.35.42.png")

Are there some other settings I may have missed?


Answers:
author: Manju
body: Looks like your SSH configuration on the client isn't setup properly.

Please check if the ssh-agent has your keys loaded. If not, please add them to the agent.

Run below commands in terminal to do so,

To check if keys are loaded:

```
ssh-add -l
```

To add keys to agent:

```
ssh-add <path_to_key>
```

more like,

```
ssh-add ~/.ssh/id_rsa
```

Key in the passphrase used while generating the ssh key and you should be good to go.


Tags: mac
Is there a way that I can force Sourcetree to obtain the PublicKey provided on my Atlassian account?
Asked by Rose Manda:

I am trying to add my atlassian account in SourceTree. It has enforced SSH. For some reason, I am getting Public Key denied message. Could someone help?


Answers:
author: Rose Manda
body: Thx Michael.. Firstly I am on Mac.

Yes, the one on my machine is different to what I have on Bitbucket. I got locked out from Bitbucket hence unable to change the one there. So looking for a way around.

comments: author: minnsey
body: Hi  

I don't believe there is a way apart from getting access back into your bitbucket account directly through the bitbucket web ui.


author: Rose Manda
body: I had to open a brand new account to start as new user. Could not access bitbucket account.


author: minnsey
body: Hi  

In Sourcetree for Windows the SSH keys are managed using PuTTY/Pagaent or openSSH. Are your keys loading correctly into the manager you have chosen?  

Is there any chance they key you are loading locally is not the same key you saved into Bitbucket?


Tags: mac
Do not allow a commit with empty message
Asked by Hau Nguyen:

When I try to commit a file with empty message, SourceTree (v2.6.10) will show a warning popup "Empty Commit Message".

I have checked on "Don't ask me again" in that popup. But I do not know how to revert that.

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

Please help.

Thanks a lot!


Answers:
author: minnsey
body: Hi  

You should be able to find the setting in the %localappdata%/Atlassian/Sourcetree.exe_url_{hash}/{version}/user.config called SuppressWarningOnEmptyCommit.  

It will be currently set to **true** either set it to **false** or delete the entry
Staging files while using Nodemon
Asked by VincentLoi:

Hey guys,

Anyone here used Nodemon before? Every time I stage a file or even click to see the file changes, it triggers a change and then Nodemon detects that.

Just curious as to why it detected a file change... bit annoying as it keeps restarting my server.

Thanks


Answers:
author: minnsey
body: Staging etc will cause at very least a change in the .git folder of your repo, is Nodemon *watching* that folder?


Tags: node.js
Sourcetree V 3.0.6 for windows doesn't update repository states.
Asked by Randy St. John:

I have version 3.0.6 of sourcetree for windows. When opening the "New Tab" to open a repository the state of the repositories is not accurate. After switching all my repositories to an "dev" branch this "New Tab" displays them all still on an "integration branch".

If i click and open a repository then it correctly shows the state of the repository. See the images below.

![sourceTreeOne.PNG](/t5/image/serverpage/image-id/35089i71A54674C930E2AF/image-dimensions/644x209?v=v2 "sourceTreeOne.PNG")Here it shows ISAPIDLLs as being in the integration branch.

![sourceTreeRepoDev.PNG](/t5/image/serverpage/image-id/35090iE83276ADF104F9BA/image-size/large?v=v2&px=999 "sourceTreeRepoDev.PNG")After clicking on the "ISAPIDLLs" repository it correctly shows it being on the "Dev" branch


Answers:
author: Mike Corsaro
body: Hello! Thanks for finding this issue -- I'll create a ticket for it.
Source Tree Windows - Can't login to Bitbucket - HTTPS Error
Asked by Richard_Kok:

this has got to be the worst piece of code management app i have ever used.

I installed source tree on windows. added my atlasian bitbucket account and attempted to clone a repository.

The app keeps prompting me twice for password and keeps failing to authenticate.

What a piece of rubbish!!!


Answers:
author: Mike Corsaro
body: This is probably due to an issue with the git-credential-manager-for-windows. Please download and install the latest version [here](https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases) (and tell Sourcetree to use System Git), or download [Sourcetree 3.0.](http://product-downloads.atlassian.com/software/sourcetree/windows/ga/SourceTreeSetup-3.0.5.exe)
Move local repo to bitbucket cloud
Asked by Raju Kantheti:

Will the version control history retains after moving to cloud.


Answers:
author: Mikael Sandberg
body: Hi Raju,

Welcome to the Atlassian Community.

The short answer is yes, the history is retained. Each clone of a repository contains the full history (there are exceptions),

comments: author: Raju Kantheti
body: <https://confluence.atlassian.com/sourcetreekb/migrate-local-repository-to-bitbucket-cloud-951412224.html>

I do not see migrate to bitbucket cloud option. should i be using enterprise edition for this.


author: Mikael Sandberg
body: Are you migrating from one Bitbucket Cloud instance to another? Or from Bitbucket Server to Bitbucket Cloud? Or are you trying to add an exiting local repository to Bitbucket Cloud?


author: Raju Kantheti
body: Hi Mikael,

We are trying to add existing local repo to Bitbucket Clound.


author: Mikael Sandberg
body: Okay, so after you created the repository in Bitbucket you will get instructions on how to get your local repository into Bitbucket. The three steps are:

1. cd into your local repository
2. Point your local repository to Bitbucket by setting the remote URL
3. Push your repository to Bitbucket

You can read more about it here, [Repository setup](https://confluence.atlassian.com/bitbucket/repository-setup-877174034.html)


author: Raju Kantheti
body: Mikael,  

What are steps to move repo's from Bitbucket Server to Bitbucket Cloud. I tried to look in doc's but could not find any help.


author: Mikael Sandberg
body: Moving from Bitbucket Server to Cloud is just a normal [import of a repository](https://confluence.atlassian.com/get-started-with-bitbucket/import-a-repository-861178561.html?_ga=2.144880500.1553957657.1539615125-2080863168.1525731940). If you have projects and repositories in Bitbucket Server and are on Linux, take a look at this script, [Migrate Atlassian Bitbucket Server to Bitbucket Cloud](https://github.com/swoodford/migrate_bitbucket_server_to_bitbucket_cloud). Note that any settings like branch permissions, project/repository permissions has to be manually configured.
Unable to push to repository which got merged
Asked by Shashi Arrabeli:

Hi ,

I have cloned the repository to feature branch. Suddenly when I am pushing all my changed to repository I am getting an invalid user or password issue.

remote: Invalid username or password

fatal: Authentication failed for 'https://Shashi-Arrabeli@bitbucket.org/7Summits/nimmbl-lightning.git/'

I am not facing any issues when I am copy the url and pasted it in the browser.

The other thing the 'feature' branch of mine got merged with 'master' branch.

Let me know.

Thanks

Shashi


Answers:
author: minnsey
body: Hi  

Try deleting any entries in the Windows Credential Manager indexed as ***git:<https://bitbucket.org>*** or ***git:https://username@bitbucket.org*** run a git fetch and you should be re-prompted for your bitbucket credentials.  

It is also worth logging out and then back into the bitbucket website as this can reset any locks that may have been created by too many failed login attemps
How to discard changes to individual lines of a file?
Asked by Greg Burghardt:

One of the main reasons I use SourceTree is the ability to commit changes to individual lines of a file, or discard those individual changes.

After upgrading to 2.6.10 on Windows 10 I can't seem to find this functionality anymore.

In the diff pane you used to be able to select multiple lines, right-click and select "Stage selected lines" or "Discard selected lines." Now right-clicking on a selected line in the diff pane just deselects the line.

Similar question from 2016, but the UI has changed since then, so the accepted answer does not apply to this version of SourceTree: <https://community.atlassian.com/t5/Bitbucket-questions/What-if-you-don-t-want-to-stage-commit-part-of-the-quot-hunk/qaq-p/116026>


Answers:
author: minnsey
body: Hi  

When you select 1 or more lines in the diff view the *Stage Hunk* , *Discard Hunk* buttons in the upper right of the diff view should change to *Stage Lines, Discard Lines*

comments: author: Peter Wesley Hutcheson
body: This functionality is so useful!


author: nymbus86
body: The problem is that when you scroll down within the diff view preview panel the Stage Lines / Discard Lines buttons become invisible. It would be best if you could have them fixed. I do understand that you can have more than one hunk per file (and even per multiple files selected), but I think you can still have those buttons visible while scrolling within the range of a hunk and have them slide up (or down) once the hunk from below (or above) reaches the top. I hope what I am saying is making sense.


Tags: commit
How can I specify the SSH key to use for an account?
Asked by PythagoRascal:

I'm using Sourcetree with multiple different accounts, for each of which I have a separate SSH key. I'm wondering how I can specify which key to use for which account. In the account settings it only ever shows me 'id_rsa.pub'.

Is there a settings file somewhere that I could modify?

I'm on OSX 10.13.6 with Sourcetree Version 2.7.6 (177).

10.13.6


Answers:
author: Rob Watts
body: I have this question too. You can hold down option key when you click Generate Key to create a new key. If you have already generated one (like me) and just wanted to selected it.. I don't know either but I would like to.

<https://confluence.atlassian.com/bitbucket/set-up-an-ssh-key-728138079.html#SetupanSSHkey-Step2.Addthekeytothessh-agent.1>

comments: author: Dan Farrell
body: Hi I've added a solution here if you're still looking  
<https://community.atlassian.com/t5/Sourcetree-questions/Sourcetree-support-multiple-SSH-keys/qaq-p/23635>


author: Stanzilla
body: Looks like this is still not possible

comments: author: Dan Farrell
body: I've added a solution if you're still wanting this :)  

<https://community.atlassian.com/t5/Sourcetree-questions/Sourcetree-support-multiple-SSH-keys/qaq-p/23635>


Tags: account

key

multiple

ssh

ssh-key