youngmon/atlassian-qna huggingface dataset:
How to commit multiple files from memory using bitbucket API?
Asked by Kurt Rhee:

Hello I have been able to upload files to bitbucket cloud by saving them first to my disk and then commiting them one by one to my repository via the API, but I haven't been able to send files that are in memory and I haven't been able to send multiple files which should get committed to different folders at the same time.  

Does anybody know how to do this?  

I am writing my api functions in python using the requests library.


Answers:
author: Syahrul
body: Hi [@Kurt Rhee](/t5/user/viewprofilepage/user-id/4612105)

Welcome to the community!  

If I got this right you wish to use the API to create commit on multiple files from memory? If yes, I believe the following curl API endpoint can be used with the content type of **multipart/form-data** to commit multiple files:  

```
curl --request POST \  --url https://api.bitbucket.org/2.0/repositories/<WorkspaceID>/<RepoSlug>/src \  --header 'Authorization: Basic cm9.....==' \  --header 'Content-Type: multipart/form-data' \  --form 'message=my commit message' \  --form branch=<branch name> \  --form file1=@<My First File Path>\  --form directory/file2=@<My Second File Path>
```

<br />

As for using python, I am not an expert on this, but from my research on how to POST a file with Python and I found the following example:

```
import requestsfrom requests_toolbelt.multipart.encoder import MultipartEncoderm = MultipartEncoder(    fields={            'branch': 'dev',             'message': '<Your MESSAGE>',            '/path/file1': ('filename', open('file1.py', 'rb'), 'text/plain'),            '/path/file2': ('filename', open('file2.py', 'rb'), 'text/plain'),}    )........r = requests.post(url, data=m, headers)
```

I hope this helps!  

Cheers,  
Syahrul

comments: author: Kurt Rhee
body: Hello this is very helpful thank you!


Tags: bitbucket-cloud

cloud
I no longer receive email notification from bitbucket
Asked by Julien Doyon:

I've been on Bitbucket for 4 years, and I always received email notification. About two months ago, I stopped receiving email notification from Bitbucket without changing anything specific. My collegue doesn't seem to have the same issue as I am and their notifications work great on their side. There is nothing in my spam or anything like that.


Answers:
author: Caroline R
body: Hi, [@Julien Doyon](/t5/user/viewprofilepage/user-id/3098573)!

Thank you for reaching out to Atlassian Community!

I checked our logs and confirmed that your email had a block on the server that prevented emails from being sent to your address. So I removed your email from this suppression list.

Could you please confirm if you receive the notifications now?

Kind regards,  
Caroline

comments: author: Julien Doyon
body: Yes, it works now! Thank you very much! Very appreciated!


author: Caroline R
body: You are more than welcome, Julien! I'm happy to help.

Kind regards,  
Caroline


author: a.ginanjar
body: Hi [@Caroline R](/t5/user/viewprofilepage/user-id/3934006) , my manager invite me to new project but I couldn't get any emails from bitbucket.

Same issue?

Kindly advise.

Thank you.


author: Caroline R
body: Hi, [@a.ginanjar](/t5/user/viewprofilepage/user-id/4648903)!

I would like to ask if you could please create a new question for your issue. 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.

Thank you.

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud
Plan?nderung
Asked by LM:

Wenn wir mit 5 Usern den kostenlosen Plan benutzt haben und jetzt weitere User hinzuf?gen, bleiben die ersten 5 weiterhin kostenfrei?


Answers:
author: Caroline R
body: Hi, [@LM](/t5/user/viewprofilepage/user-id/4611360)! Welcome to the community!

Just to give you some context, if the workspace is under a free plan, you won't be able to add more than 5 users. If you need to add more than 5 users to this workspace, you will need to upgrade the workspace plan to standard. You can access the link below to check the price of each plan as you add users to your workspace:

* <https://www.atlassian.com/software/bitbucket/pricing>

I hope this helps, but please don't hesitate to ask for any further information if needed.

Kind regards,  
Caroline
Securing Bitbucket Code
Asked by IT-ADMIN:

Hello,

Please I need your help in something that we don't know if this is available or not so we will ask you directly,

When developers work on Bitbucket repo code they download it to their local laptops and work on it then upload it to the bitbucket again, is there any way that we can prevent the users from copying and pasting or sending this code to them selfs through email form the local downloaded repo.

In other words, is there a way to prevent Bitbucket code locally from being copied or send to an external email?


Answers:
author: Nic Brough -Adaptavist-
body: No. One of the big points about git is that it is built for working on remote repositories. It doesn't work unless the users have local access to the code and that means a copy of it.

And of course, once someone has a copy of something they can do what they want with it.


Tags: bitbucket-server

migration-customer-care

server
user integration with jira cloud
Asked by Stephen Langenhoven:

is it possible to manage bitbucket cloud users from jira cloud?


Answers:
author: Syahrul
body: Hi [@Stephen Langenhoven](/t5/user/viewprofilepage/user-id/4587535)

Welcome to the community.

Currently, it's not possible to manage your Bitbucket cloud user from the JIRA cloud. We do have an existing feature request on this, please **Vote \&** **Watch**the feature request so you'll receive an update at:

* [ID-6733 - Unify user management between Jira/Confluence Cloud and Bitbucket Cloud](https://jira.atlassian.com/browse/ID-6733)

Let me know if you have any additional questions.

Regards,

Syahrul


Tags: bitbucket-cloud

cloud
Bitbucket checkout no longer showing copy and paste command
Asked by Matthew Fraser:

For the last few weeks the bitbucket checkout no longer has a command you can copy and paste to checkout a particular branch.

It used to be:

git fetch \&\& git checkout BRANCH_NAME

It now just shows:

BRANCH_NAME

I assume this isn't intentional, if not can a bug be raised?

Here are some pics:

![screenshot_2021-10-26_11-44-35.png](/t5/image/serverpage/image-id/166555i245DF0EB02243117/image-size/large?v=v2&px=999 "screenshot_2021-10-26_11-44-35.png")![screenshot_2021-10-26_11-44-39.png](/t5/image/serverpage/image-id/166556i18DE6B980EC898E5/image-size/large?v=v2&px=999 "screenshot_2021-10-26_11-44-39.png")


Answers:
author: Caroline R
body: Hi, [@Matthew Fraser](/t5/user/viewprofilepage/user-id/4611117)! Welcome to the community!

Recently, this command has been removed from our UI due to vulnerability reasons. We understand that this may impact the workflow of some developers, so we have already created a feature request to add the git checkout command to the UI again as you can check here:

* <https://jira.atlassian.com/browse/BCLOUD-21422>

The first comment in that issue is from one of our developers and gives more details on this.

I would suggest that you add your vote there (by selecting the **Vote for this issue** link) as the number of votes helps the development team and product managers better understand the demand for new features and you are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the **Start watching this issue** link), this way you will receive updates about this request.

Implementation of new features is done as per our policy [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) and any updates will be posted in the feature request.

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud
Recover repositories without email account access
Asked by Simon Hodgson:

Hi,

I created a bitbucket account years ago, and since using it, the domain name where my email address was, has lapsed and been taken over by another.

Ive tried recovering using the email address, but it is sent (of course) to the email at the domain I no longer own.

Ive emailed the same address directly to see if anyone picked it up, but no reply after timing out resending.

Is there anyway I can recover access to my account as I have quite a number of key repositories there, and Im desperate to get them back.

Ive moved on 2 laptops since and dont have local copies any more.

any help would be so gratefully received. I tried through support and they said to create another account here and post the question to the community.

Thankyou


Answers:
author: Theodora Boudale
body: Hi Simon,

I assume that your question concerns a Bitbucket Cloud account (<https://bitbucket.org/>)?

The following community article explains in detail how we verify account ownership in Bitbucket Cloud, what the support team can help with, what we cannot help with, and recovery options:

* <https://community.atlassian.com/t5/Bitbucket-articles/Bitbucket-Cloud-account-ownership-and-data-access/ba-p/1311340>

If this was a non-managed account and you remember its password, you should still be able to log in to the account even if you don't have access to its primary email address and transfer any repos to another Bitbucket Cloud account of yours that you have access.

I'm afraid that we cannot change the email of an account when a request is coming from an email that is not associated with this account, as the email is used to verify ownership.

Kind regards,  
Theodora
selectAllFilesOnCommitSelection 0 behaves like 1
Asked by Craig Hurley:

When I set "Select all files when selecting commit" to 0, it always behaves as 1

I confirm that "Select all files when selecting commit" is set to 0 by running the following:

```
defaults read com.torusknot.SourceTreeNotMAS selectAllFilesOnCommitSelection
```

SourceTree 1.7.3

OS X 10.9

Intended or bug?


Answers:
author: Craig Hurley
body: Same issue is present in SourceTree 1.7.4.
Is there a Japanese localization for SourceTree?
Asked by kumorig:

This is a potential duplicate of [this](/questions/175544/can-i-change-the-language-setting-of-sourcetree-for-windows-to-japanese)and for that I apologize, but new information has presented itself so I think the question is justified.

There now exists a /ja/ subfolder and a SourceTree.resources.dll. This hints that there might already be something in place. I couldn't find anything during the installation or in the config file (SourceTree.exe.config).

Then I also found [this repo](https://bitbucket.org/koty/sourcetree.resources.ja) which seems *suspiciously* related, and looks to be an *almost* completed translation.

If this is true, is there perhaps a way to testrun this localization? A config change or a command line switch maybe? Please excuse my bluntness. I'd kill for japanese localization!

Thanks for any help!


Answers:
author: stevestreeting
body: We've planned to add translations for a while (the Mac version has a Japanese translation), but haven't had the time to do it yet. We're in the process of setting up a community translation hub so that SourceTree for Windows can be translated into more languages, including Japanese. We're going to try to convert as much from the Mac version as possible before we open it up to user contributions (no point duplicating effort if we can avoid it), but we hope to open this up relatively soon with the intention of getting a Japanese version (and hopefully others) out there perhaps in a couple of months.

Keep an eye on our Twitter (<http://twitter.com/sourcetree>) and blog (<http://blog.sourcetreeapp.com>) for further announcements!


Tags: locale
SourceTree not checking remote repository for updates
Asked by Phil Bernie:

Since upgrading to SourceTree 1.3.1.0 SourceTree doesn't appear to be checking remotes for updates.

Nothing has changed in my network or server configuration, it just doesn't let me know that there are new changes to be pulled into my local repo.

Has anyone else had this issue?


Answers:
author: Jeff Thomas
body: I just updated to 1.3.1 and it fetched from my remotes automatically.

If you go to Tools \> Options, on the General tab, is "Check default remotes for updates every x minutes" ticked and set to a resonable number of minutes?

![](../../upfiles/Screen_Shot_2013-11-01_at_8.16.50_AM.png)
Sourcetree relocates to current workspace when clicking on dock icon
Asked by jkeys089:

I'm not sure if it is a feature of the latest version of Sourcetree or if it is a side-effect of my recent upgrade to Mavericks but everytime I click on the Sourcetree icon in the dock it relocates the app to whichever workspace I'm currently in. I'd like to go back to the old way (i.e. clicking on the dock icon takes me to the workspace where Sourcetree is located) if possible because all of my other apps work that way.


Answers:
author: jmhowitt@mac.com
body: Still broken 2.0.3. really annoying it is the sort of thing that will stop me using it after a while


author: Roger Ivy
body: This problem still exists in Sourcetree version 1.7.4.1


author: Roger Ivy
body: I have the same problem. Since upgrading to Mavericks my "Bookmarks" window seems to be a law unto itself, the only way I can get it under control is to manually move it back to it's correct desktop/workspace by using expose, or quit it and re-launch it.

The repo windows seem to stay in the correct desktop, which makes it even more difficult.

Wouldn't it be great if the Mac SourceTree worked like the Windows SourceTree with a side-bar. I have having many windows open. Even tabs would be better than the current system.
How to change the default clone command to get progress output?
Asked by cvsguimaraes:

The default command while cloning a git repo via SourceTree is something like

```
git -c diff.mnemonicprefix=false -c core.quotepath=false clone --recursive https://github.com/My/Repo.git C:\dev\MyRepo
```

Since SourceTree has an option to view the command output and I believe that Git's clone command has a flag to see the clone progress (% of completeness) I ask you guys:

How can I change the default clone command used by SourceTree so I can customize it and get progress output?


Answers:
author: KieranA
body: Hey,

This is already on the roadmap for future versions, it's been there for quite a while but there wasn't enough interest to prioritise it.

Just as a sidenote, if you want to log feature requests for SourceTree in the future you can log them directly to us developers via [jira.atlassian.com](http://jira.atlassian.com) project SRCTREE.

Thanks! :)


author: cvsguimaraes
body: Could you guys at least say "No, it's not possible" or whatever?! Gee
SourceTree painfully slow
Asked by charles chen:

Title says it all. I love SourceTree and have been using it to great effect for the last two years. However, somewhere along the line (2-3 months ago?) it became much, much slower. I'm running the latest version on OS X 10.8.5.


Answers:
author: charles chen
body: Hi Jeff,

Thanks for the response.

1. "A lot of untracked files" isn't the problem.

2. I'm using the latest (non-app store version of source tree).

3. I have a recent model, maxed-out (ie. plenty of cpu, disk, ram, fusion drive) iMac.

4. See 2.

5. Yes, it's local.

6. Git from the command line remains snappy even when SourceTree gets very sluggish.

7. Nope.

Here's some more info:

1. I haven't figured out yet whether this is always the case, but SourceTree seems slower when cpu usage is high by other apps. ie. Xcode which is constantly re-indexing the workspace/repo, ie. whenever I switch branches.

2. Our repo has many files in it, but few of them are modified (staged or unstaged) at any given time.

3. SourceTree got slower. I'm not sure exactly when, I think it was this Summer. It never had these problems before.

comments: author: Jeff Thomas
body: You're not alone in SourceTree being slow, I've seen posts by other users with similar issues and there are some [open issues in the SourceTree JIRA](https://jira.atlassian.com/issues/?jql=project%20%3D%20SRCTREE%20AND%20status%20%3D%20Open%20AND%20text%20~%20slow%20ORDER%20BY%20updated%20DESC) talking about performance. I've experienced it a couple times myself, but restarting SourceTree always seems to fix it.


author: Jeff Thomas
body: Hi Charles,

Have you checked out the [Troubleshooting Performance Problems](https://confluence.atlassian.com/display/SOURCETREEKB/Troubleshooting+Performance+Problems+in+SourceTree) in SourceTree documentation? There is a checklist of items to verify that could be causing SourceTree to perform slowly.
>
> 1. If you have a lot of untracked files, make sure the filters in SourceTree don't show these as Git/Hg take a long time to respond.
> 2. If you're using a system version of Git/Hg, make sure it's a recent version.
> 3. Limited system resources, CPU, RAM, plenty of hard disk space etc.
> 4. That you've got an up-to-date copy of SourceTree (we no longer publish to the App Store!)
> 5. That the repository location is local, i.e. on your hard disk rather than over a network or mounted volume.
> 6. Calling Git/Hg from the terminal performs as expected i.e. 'git log'
> 7. Is there an application constantly writing to data to disk in a repository location? This would cause SourceTree to constantly refresh.

comments: author: Micky Duncan
body: The only thing that has changed in my long-term use of SourceTree is the latest version **1.6.4** and it is painfully slow.

**EDIT** : **1.6.5** is back to normality.

Thanks
SourceTree git remove files from last commit
Asked by Joel Chen:

I want to amend my last commit and remove some files from it and put them back as "Uncommitted Changes", is this possible in SourceTree git?


Answers:
author: Joel Chen
body: <https://answers.atlassian.com/questions/112557/git-amend-a-commit-do-more-than-change-the-message>


Tags: commit

git
Feat. Req: Specify shell for Windows
Asked by charles_bates:

It would be nice to be able to specify the command shell to use, rather than merely a choice between bash and cmd -- I generally use Powershell with posh-git for my git command line.


Answers:
author: Peter Van de Voorde
body: Hi Charles,

You should submit your feature request here : <https://jira.atlassian.com/>

This is more a support community.

Best regards,

Peter

comments: author: charles_bates
body: Thanks for the link; submitted.


author: Peter Van de Voorde
body: your welcome, I'm happy I could help :)
Update Submodule content per parent branch
Asked by joostfontein:

I have a parent (git) project with a submodule (git).

However, when I update the submodule in the parent/develop branch, the parent/master branch also contains the updated submodule files...

So while I want to test my parent code with the updated submodule code, the updates submodule code already appears in master ... what a disaster... that could create.

How do I solve this?

(Using SourceTree git on Mac).


Answers:
author: joostfontein
body: See <http://git-scm.com/book/en/Git-Tools-Submodules>

Switching branches with submodules in them can also be tricky. If you create a new branch, add a submodule there, and then switch back to a branch without that submodule, you still have the submodule directory as an untracked directory:

    $ git checkout -b rack Switched to a new branch "rack" $ git submodule add git@github.com:schacon/rack.git rack Initialized empty Git repository in /opt/myproj/rack/.git/ ... Receiving objects: 100% (3184/3184), 677.42 KiB | 34 KiB/s, done. Resolving deltas: 100% (1952/1952), done. $ git commit -am 'added rack submodule' [rack cc49a69] added rack submodule 2 files changed, 4 insertions(+), 0 deletions(-) create mode 100644 .gitmodules create mode 160000 rack $ git checkout master Switched to branch "master" $ git status # On branch master # Untracked files: # (use "git add <file>..." to include in what will be committed) # # rack/ 

You have to either move it out of the way or remove it, in which case you have to clone it again when you switch back---and you may lose local changes or branches that you didn't push up.

=\> So, suppose that is just the way it is..


Tags: git

submodule
Source tree adds ._.png files
Asked by joostfontein:

I added .png files to my working directory. For each filename.png sourcetree shows an additional ._filename.png file. I can also stage them...

What/why is that?


Answers:
author: KieranA
body: Hi Joost,

This isn't something we're aware of. Is this for the Windows version? If you can stage them then this means they're in the file system. Does it happen every single time you add a file to your working directory?

Cheers

comments: author: joostfontein
body: Hi Kieran,

Mac version.

Yes, every time I add a .png file to working directory.

In Finder I don't see them (but have "view hidden files and folders" turned on).

Workaround: .gitignore =\> ._\* However, a bit strange though...


author: KieranA
body: The best way would be to use "ls -a" on the directory in question within the terminal rather than relying on the Finder
"White font" bug in history view
Asked by Cyril Labbe:

Hello,

I get a strange bug on SourceTree on my windows 7. Everything works fine but when displaying the history view, the background color alternance of the list is between white and blue (the "line selection blue) instead of white and light gray. And the color font of all lines is white (for author, date, description and hash), making odd line "white font on white background" hard to read.

[![example of buggy display](http://img405.imageshack.us/img405/6990/8r99.jpg)](http://imageshack.us/photo/my-images/405/8r99.jpg/ "buggy list")

I tried to change windows' "theme" or window colors, but with no effect on that bug. Sourcetree is the only software on my computer behavign like that.

Is anyone else having this issue? Any solution?


Answers:
author: Alan Warren
body: I'm having this issue as well.

SourceTree on Windows appears to get colour values from the Windows environment at startup. You can control what colours are used there by changing your preferences for "Selected Items" in the advanced "Window Color and Appearance" control panel applet. Though of course, this will change the colours for every application on your system (provided the application is a good Windows citizen).

For my experimenting with SourceTree I've set the background colour to (rgb) 184,254,194 and foreground colour to 35,89,129. I'm hoping the change is subtle enough that its impact on other applications won't be so jarring (selected text while editing this message is impacted in Chrome, but it's not hideous).

Hopefully Atlassian will revise their code to only use the "Selected Items" colour preference for actual selected items. I'd expect the "Window" background and foreground colours would be a better fit for odd numbered rows, and then use a light grey for even rows. Or just darken the Window color.

It is odd that Windows doesn't use the "Color 2" property of "Selected Items" to store a bg colour for non-selected items.

Cheers,  
Alan


author: VipSaran
body: You are lucky -- you at least have alternating rows!

Mine are all white:

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

(the blue row is a selection -- at least that works)


author: Rares Tohanean
body: BugForegroundSourceTree.png

I have a similar problem with the start screen of Sourcetree app. I have a black background - white foreground windows theme. The application should not use Windows Foreground Color if the background is a fixed color "white".  
[](https://community.atlassian.com/t5/Sourcetree-questions/quot-White-font-quot-bug-in-history-view/qaq-p/286504?attachment-id=1685){#link_116c0d55b6799b}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/32372/1/BugForegroundSourceTree.png){#display_116c0d55b6799b_0}


Tags: colour

display

windows