youngmon/atlassian-qna huggingface dataset:
How can I add a new user to bitbucket via api.bitbucket.org/2.0/
Asked by Andrii Romanyshyn:

Hello  
My company has a new developer user and I need to add them to Bitbucket and the group using the Bitbucket API  
Is there an endpoint for this?


Answers:
author: Ben
body: Hey Andrii,

Welcome to the Bitbucket Cloud Community!

Unfortunately, we do not have an API endpoint to handle adding a new member to a workspace. This is because they must be invited first via email within the Bitbucket Cloud UI, and they must accept the invite if they already have a Bitbucket Cloud account (or sign up to Bitbucket first and then accept).  
The process is detailed here:  
<https://support.atlassian.com/bitbucket-cloud/docs/grant-access-to-a-workspace/>

Once the user is present on the workspace however, they can be added to an existing group by following the steps contained in the link below via our /1.0/groups endpoint (see PUT new member into a group heading):  
<https://support.atlassian.com/bitbucket-cloud/docs/groups-endpoint/>

Hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)

comments: author: Andrii Romanyshyn
body: Hi Ben,

thank you for the information


author: Ben
body: Hey Andrii,

No worries - happy to be of assistance :)

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: api

bitbucket-cloud

cloud
What is the best way to pull a code to the local Machine
Asked by Malarmannan:

I had pushed my local repository to the bitbucket cloud repository, Now i want to work in two different features parallelly as branch and then after testing i merge with master, what is the best way for this case. Should i create a another repository in local machine and then pull the code...?


Answers:
author: Ben
body: G'day Malarmannan!

Welcome to the Bitbucket Cloud community! :)

Based on your use case, if you wish to work on separate branches before merging them into master - I would suggest ensuring these branches are created in your remote repository (ie create 2 branches, branched from master) and then pull them down to your local.  
Once you have these two branches locally, you can simply switch between them using git checkout command and then push to each branch when you are done making changes to them:

```

git checkout branch1
git checkout branch2
```

You can then create a Pull Request in the UI to merge these branches into master.

Hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
Someone has already added that SSH key.
Asked by Rob Armstrong:

Someone has already added that SSH key.  
ssh -T git@bitbucket.org  
authenticated via ssh key.  

You can use git to connect to Bitbucket. Shell access is disabled  


Answers:
author: Ben
body: Hey Rob,

If you are comfortable sharing the public SSH key that you are trying to use here, please do so and I can look this up in the backend to see which workspace it belongs to - otherwise I will raise a ticket for you on your behalf accordingly:

```
cat ~/.ssh/sshkeyname.pub | pbcopy?
```

Cheers!

- Ben (Bitbucket Cloud Support)

comments: author: Rob Armstrong
body: Redacted


author: Ben
body: Hey Rob,

Unfortunately, we have no internal mechanism for deleting SSH keys.

As you have contacted us from an email address that does not match the email that is associated with the workspace, we cannot delete the workspace either to free up the SSH key. This is due to our security policies which protect the deletion of user-generated content without written consent from the email account which is associated with a workspace.

I would suggest reaching out to an administrator from the previous organisation that the r\*rm\*tr\*ng@gc\*te\*h.com email belongs to, so that the email can be re-enabled and you can gain access to the workspace by resetting the password. Alternatively, if you remember the password you can try to log in and remove the SSH key also.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
I keep getting this log when I import my GitHub repository
Asked by Giyu:

1. 13:35:51 git import for: <https://github.com/Giyulol/pokemon-showdown.git>
2. 13:35:51 Cloning <https://github.com/Giyulol/pokemon-showdown.git>...
3. 13:35:52 Remote Git clone failed: \<class 'bitbucket.apps.asyncx.tasks.RepoImportTask.ImportException'\>: Command failed. Return value: 128


Answers:
author: Patrik S
body: Hello [@Giyu](/t5/user/viewprofilepage/user-id/4988140)

Welcome to Atlassian Community!

This error is usually returned when there is an authentication error. Checking for the GitHub repository you are trying to import, it's a public repository that does not require authentication to be cloned.

I went ahead and tried to import it to my own workspace for testing purposes, and it was imported successfully.

In this case, could you please try importing the repository again following the below steps:

* Go to <https://bitbucket.org/repo/import>
* Provide the URL <https://github.com/Giyulol/pokemon-showdown>
* Leave the "Required Authorization" option unchecked
* Select the bitbucket destination workspace, project, and repository.
* Click **Import Repository**

Once you run it again, let us know how it goes.

Thank you, [@Giyu](/t5/user/viewprofilepage/user-id/4988140) .

Kind regards,  
Patrik S

comments: author: Miguel Costa
body: Hi [@Patrik S](/t5/user/viewprofilepage/user-id/4603309)

I've got the same error, although a slightly different scenario. I'm trying to import repos between two different BitBucket accounts where the source isn't public, so I'm using the required authentication checkbox and credentials but getting the error above.

Kind Regards,

Miguel


author: Patrik S
body: Hello [@Miguel Costa](/t5/user/viewprofilepage/user-id/4994522) ,

I would like to ask if you could please create a new question for your issue, providing details on the errors you see and also whether it concerns a Bitbucket Cloud or Bitbucket Server repo

.We generally encourage users to create a new question for their issue instead of posting on someone else's question, because 1) the root cause and resolution may be different for each case 2) a question can become cluttered and difficult to follow if we try to troubleshoot multiple users' issues in it.

Please feel free to let me know if you have any questions.

Thank you, [@Miguel Costa](/t5/user/viewprofilepage/user-id/4994522) .

Kind regards

Patrik S


author: goofyfooter
body: How does one create a new question. I can find no button to start a new question?


author: Miguel Costa
body: Hi [@goofyfooter](/t5/user/viewprofilepage/user-id/630432)

On the comunity page header you should have the following if signed in.

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

Regards,

Miguel


Tags: bitbucket-cloud

cloud
Possible to configure a commit messages template which uses the JIRA issues as a prefix?
Asked by Young Kwang Kim:

Hi, I use SourceTree 2.1.2.4 and Git 2.12 on Windows 10.

[This blog](https://blog.sourcetreeapp.com/2012/02/06/jira-integration-other-external-project-links/) introduced that the commit message can be linked to a JIRA issue by configuring the prefix.

Since I use JIRA and Confluence cloud, I'm satisfied with this feature.

However, typing the prefix number at the commit message for every commit is quite annoying to me.

For instance, if the prefix is \[JIRA-123\], I always type \[JIRA-xxx\] manually at the commit message.

Since Git supports "[gitmessage template](https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration)", I'm curious whether SourceTree uses the message template or not.

If I create and configure the template, will SourceTree use my template?

-Best Regards


Answers:
author: bgannin
body: While commit templates are supported on macOS, they are not yet available on Windows. Please vote on and watch this ticket: <https://jira.atlassian.com/browse/SRCTREEWIN-3817>


author: Mukesh Kumar
body: Hi [@Young Kwang Kim](/t5/user/viewprofilepage/user-id/365228)   

We have supported this feature in Sourcetree for Windows in 3.4.20 release. It will be available by 17th September 2024.   
Either update from Sourcetree app or download the latest version from <https://www.sourcetreeapp.com/>
Pulling changes in SourceTree caused a merge without asking
Asked by Tim Baker:

I have been working on Branch A and Branch B today, commiting changes during the day ready to push at the end of the day.

Someone else has been working on branch B today also, so before I pushed my changes, I pulled theirs. So with Branch B checked out, the number of commits to pull was 4, and the number to push was 2, but after doing the pull, the pull number went up (can't remember the exact number) and the number of commits to push went up aswell, to 18. So I pulled again and then pushed, thinking they were automatic conflict resolutions, only to then discover one of the items was a merge, taking my changes from Branch A earlier in the day into Branch B - really not what I wanted.

This isn't the first time I have had this issue, but the first time I thought I must have done something by accident, this time I know for sure I haven't.

"Commit merged changes automatically" was checked, is there anyway this could have caused it? Have I done something wrong here? What could have caused this?


Answers:
author: rrudnicki
body: Hi Tim,

Your thoughts make sense.

By enabling the *Commit merged changes immediately* you give sourcetree the permission to do a commit directly/automatically if there were no merge conflicts.

Cheers,   
Renato


Tags: bitbucket-cloud

git
SourceTree installer file that I downloaded from https://www.sourcetreeapp.com/ is corrupt.
Asked by damini_agarwal:

The installer file for Windows that I downloaded from the website is corrupt. Windows says that it cannot find the program to open that file. I think the downlaoded file is missing an extension. Where else can I downlaod SourceTree from?


Answers:
author: minnsey
body: The download shoudl give you:  

<https://downloads.atlassian.com/software/sourcetree/windows/ga/SourceTreeSetup-2.1.2.4.exe>  

We've noticed in some browsers, IE from memory, strip the trailing .exe off the download depending on security settings.

comments: author: damini_agarwal
body: Thank you!
Push to bitbucket now results in "abort: authorization failed"
Asked by jk64:

I've tried uninstalling and reinstalling the latest version of SourceTree for Windows (2.0.20.1) and I can commit changes to my bitbucket repository but it fails at the Push stage with "abort: authorization failed".

How do I fix this?


Answers:
author: minnsey
body: Hi  

Are you using Mercurial or Git?


Tags: bitbucket

windows
how to push data from Sourcetree to a new repository
Asked by AptifyPankaj:

Hello All,

We are implementing version control on few of our website.

1) have creted a new repo in bitbucket for eg: prod

2) have given write access to the one user.

3) have installed sourcetree with the user account details on production webserver

Please let me know how can I push all the data of the website from prduction server to the newlycreated repo.

Awaiting your response.

Warm Regards,

Pankaj


Answers:
author: Ana Retamal
body: Hi Pankaj! I'm assuming you have the code of your website locally in your computer. From there, you can follow the steps at [Set up a repository](https://confluence.atlassian.com/bitbucket/set-up-a-repository-877174034.html) if you're using Bitbucket Cloud, or [Importing code from an existing project](https://confluence.atlassian.com/bitbucketserver/importing-code-from-an-existing-project-776640909.html) if you're using Bitbucket Server.

Let us know if you have any questions!

Regards,

Ana


Tags: bitbucket
How to search for commits where a file of a particular type was added?
Asked by Janos Locsei:

How do I search for all commits where an html file was added? I have a static website under source control and I'd like to see a record of what pages I added to the site and when.


Answers:
author: rrudnicki
body: Unfortunately, you can't search commits by filename in SourceTree. However, you should be able to do it by Git command line using:

```
?git log --follow filename
```

Cheers,  
Renato

comments: author: Janos Locsei
body: Thanks Renato. What I meant was something that tells me all files and when they were committed, so it would return something like:

a.html first committed on 1 Jan 2017  
b.html first committed on 12 Jan 2017  
c.html first committed on 23 Dec 2016  
...etc

Is there a git command that does something like that?


Tags: search
Source Treen incredibly slow and not reponding and again slow
Asked by Eduardo:

++**Context**++:

- I am new to Source Tree;

- Using Windows 10;

- Using Source Tree version 2.1.2.4

- Using GitHub with 2 remote repositories.

++**Issues**++:

- Source Tree is extremely slow and not responding after a click.

Can someone help? (Thank you very much)


Answers:
author: eddynemer
body: Check out this fix.  
Worked for me.  
[https://jira.atlassian.com/browse/SRCTREEWIN-11421?focusedCommentId=1955977\&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-1955977](https://jira.atlassian.com/browse/SRCTREEWIN-11421?focusedCommentId=1955977&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-1955977)


author: Eduardo
body: Hello,

I think I now understand the reason for Source Tree not performing well but I do not know how to resolve it.

It is not the antivirus.

My Source Tree is actually syncronising a folder which has almost 50 thousand files; it is the folder of my user (**C:\\Users\\myname.mysurname** ).

I have discovered it by opening Git Gui: the "**Unstaged Changes**" is full with the list of these files and I think this is impacting the performance of Source Tree.

Somehow (I do not know how) Source Tree is looking at the same folder and displays as well the long list of files.

++Questions++:

1. How can I tell, either to Git (Git Gui) OR to Source Tree, to **stop** syncronising this folder in my laptop?
2. Why is Source Tree looking at the same folder (how is the integration between Source Tree and Git controled?).
3. Is there a way to tell, either to Source Tree or to Git, the path to the correct folder (in my laptop) where I am storing my code?

Thank you very much.

Eduardo

comments: author: robfosse
body: Did you resolve this issue? I'm having the exact same issue and it's driving me nuts!


author: theoguedes
body: Im having the same problem. Tried to disable the antivirus and nothing happened. Still slow and not responsive.

(PS. Renato e Eduardo, nomes bem comuns no Brasil, alguma chance de voc?s falarem portugu?s e estarem se comunicando em ingl?s? =\])

comments: author: rrudnicki
body: Hi Theo,

I'm from Brazil, Porto Alegre :). The reason we are communicating in English here is that another engineer from another location or also customers around the world may not speak Portuguese and not understand what we would type here in pt-br ;)

Btw, have a look at Eduardo's answer below. Is there any chance of you are facing the same issue about a huge folder in your ST?


author: rrudnicki
body: Hi Eduardo,

I already saw a similar case with it on Windows 10. On that case, the slowness was being caused by the antivirus. If you have some antivirus installed, may I ask you to disable it **only for testing purposes**, reboot your computer and try again? If the issue persists, can you check your logs and see if you get some error message during the slowness?

Keep us posted.

Cheers,

Renato


Tags: performance
SourceTree stopped working and won't let me reinstall it completely
Asked by Shonanj:

Hello,

I have an issue I can't solved myself... After closing SourceTree, it happened that I could not open it again. So I tried to uninstall and reinstall it. The problem is that when I reinstall it, there is no wizard window or anything. Just a pop up that disappear very fast and then the files I just uninstalled reappear as previous and SourceTree laucher doesn't do anything when I click on it.

I tried deleting all the folders related to SourceTree in appdata\\local, to uninstall with advanced uninstaller to try removing all the files of sourcetree from the computer but when I reinstall, nothing change...

I could use some help :)


Answers:
author: Ana Retamal
body: Hi Bouvier! Are you using SourceTree for Mac or for Windows?

You can go to **Control Panel \> Programs \> Programs and Features** and make sure the older SourceTree versions are removed, then reboot your system to make sure the uninstall is complete.

I'd also recommend resetting your SourceTree preferences to make sure you start clean again, you cna follow the instructions at [How to wipe SourceTree preferences](https://confluence.atlassian.com/sourcetreekb/how-to-wipe-sourcetree-preferences-412484640.html).

Let me know how it goes!

Regards,

Ana

comments: author: Shonanj
body: Sorry, I didn't specify. I am using SourceTree on Windows 10, 64 bits.

I made sure that no more SourceControl versions are removed and reboot my system several times but it doesn't change anything.

I also tried to follow the instructions on how to wipe SourceTree preferences but I have no files corresponding to bookmarks.xml", "opentabs.xml", "userhosts" in C:\\Users\\\<username\>\\AppData\\Local\\Atlassian\\SourceTree\\. The folder is almost empty. Same for the file user.config.

The strange things is that everytime I delete or uninstall the process is almost instant. Just like if nothing was really happening. Just that when I uninstall the folder disappear and when I reinstall it just go back exactly where it was withtout changing anything.


author: Shonanj
body: I found a solution, kind of randomly, just deleted some files related to git in several folders and I could reinstall through the wizard and now it is working correctly. Thanks for help!


author: Ana Retamal
body: Glad it's working for you now :)
How to filter commits by author?
Asked by dylan-nicholson:

The list of commits for the current branch still often makes it hard to see just your own commits, if you've merged in other branches etc. In fact what I'd really like is a way just to see commits made DIRECTLY to the current branch, and exclude anything changed via a merge.


Answers:
author: Duane Mattos
body: There is a feature request: [BSERV-10875](https://jira.atlassian.com/browse/BSERV-10875)


author: samlachance
body: If anyone discovers this thread looking for a solution, you can try the solution outlined here:  
<https://superuser.com/questions/900590/how-to-filter-commits-by-author-in-sourcetree>

There's a custom search window if you go to **View** -\>**Search View**

comments: author: Dean Pulsifer
body: The problem with this solution it that it searches all branches. I think the request is to search a specific branch for commits from an author.


author: Ana Retamal
body: Hi Dylan, this feature is not currently available but you can submit your idea at [jira.atlassian.com](https://jira.atlassian.com/secure/Dashboard.jspa) by clicking the Create button.

Hope this helps!

Ana
Why can't sourcetree detect automatically that I need to add new files?
Asked by dylan-nicholson:

If I add, e.g., a new .cs file to a visual studio project (.csproj file), or similarly for other popular development environments, SourceTree should be able to detect automatically that this new .cs file must be added to source control when I stage/commit. Many times I've had builds fail on our ci system just because I've added a new reference to a file to a project file but forgotten to add the file itself. The visual studio git integration does handle this automatically but unfortunately doesn't work well for me for other reasons.


Answers:
author: minnsey
body: You are correct that SourceTree doesn't automatically add changed files to the git index.  

I'll be honest I don't think Visual Studio does either.  
By default. as far as I can see, Visual Stage does not stage anything, rather when you do a commit it stages AND commits in 1 step.  

If you select a changed file in Team Explorer in SourceTree and right click you can see an explicit stage command in the context menu.

comments: author: dylan-nicholson
body: I wasn't suggesting it should necessarily automatically stage them but at least highlight such files at the top of the pending list. Actually parsing the csproj file isnt even necessary, just the ability to specify a pattern for new files to look for would work well. As it is my pending files is often full of irrevelant files and unless I'm really on top of maintaining the ignore list it's very easy to miss new files that need adding.


Tags: visual-studio
Regarding the command injection issue.
Asked by Dual Wielder:

Greating,??

I am new to sourcetree, I was checking it before installing it and I read about the command injection issue. I've also checked the question in this link: ?

<https://community.atlassian.com/t5/SourceTree-questions/More-info-on-the-Command-Injection-issue/qaq-p/585845????>

I would like to know if this: [SourceTreeSetup-2.0.20.1](https://downloads.atlassian.com/software/sourcetree/windows/ga/SourceTreeSetup-2.0.20.1.exe?_ga=2.13050295.1644904012.1496866237-1952742793.1496396691)

is the latest and has the issue solved?


Answers:
author: Dual Wielder
body: Thanks for your reply, I am really glad to hear.??

I have one last question though:??according to: <https://www.cvedetails.com/vulnerability-list.php?vendor_id=3578??>

the version effected was 2.5c and prior, the one in SourceTree offical site is 2.0.20.1. This is confusing since 2.0 is prior to 2.5?????

Thanks in advance,

comments: author: Ana Retamal
body: Hi! For official information regarding the vulnerability, my recommendation is that you check our official source. You can find it at [SourceTree Security Advisory](https://confluence.atlassian.com/sourcetreekb/sourcetree-security-advisory-2017-05-10-900820365.html).

Note that the site you linked is not even differentiating between Mac and Windows versions. Whilst this is not mentioned in that website, they're probably referring to the Mac version of SourceTree (which is currently 2.5.2).

Hope this clears your concerns :)

Ana


author: Dual Wielder
body: Yes, Thank you very much! =)


author: Ana Retamal
body: Hi! Yes, SourceTree 2.0.20.1 is the latest one for Windows and it's not affected by the injection issue, it was fixed :)

Let us know if you need anything else!

Cheers,

Ana
How to report a bug?
Asked by Adam Conway:

When I come to the new community I only have the option to ask a question or start a discussion. How do I then report a bug?


Answers:
author: Thomas Schlegel
body: Hi Adam,

you can report a bug here:

<https://support.atlassian.com/contact/>

comments: author: Adam Conway
body: Thanks.

You can do it there (clicking through several steps). i still think it should be linked from the community/support page, sicne that's where the product directs you for support
Search log messages in surce tree not working
Asked by Adam Conway:

I want to search the log history in soruce tree. Searching log messages would do There is a search box![image.png](/t5/image/serverpage/image-id/1969i59D6BB3C25F99BB9/image-size/large?v=v2&px=999 "image.png")

but when I enter some text there and press enter \*absoultely nothing hapens\*!

Using latest sorucetree (2.1.2.4) on Windows 10.


Answers:
author: Ana Retamal
body: Hi Adam, the Search box will only search within the commit you're highlighting at the moment, it will not search within the whole repo. If you'd like to have that option available, you can submit a Feature request at [jira.atlassian.com](https://jira.atlassian.com/secure/Dashboard.jspa) :)

Thanks!

Ana


Tags: bug