youngmon/atlassian-qna huggingface dataset:
Transfer repo B to repo A under subdirectory named xyz with commit history
Asked by Rushi Patel:

I want to transfer "develop" branch of repository B to repository A's subdirectory named "xyz" under branch "main/develop" of repository A by preserving all commit history of repository B for branch "develop".

I have tried bundle, subtree, submodule, mirror, bare, but some transfers the data with no commit history and git filter-repo doesnt help me transfer the files itself.

Can someone please suggest solution from mac terminal or UI of bitbucket.


Answers:
author: Theodora Boudale
body: Hi [@Rushi Patel](/t5/user/viewprofilepage/user-id/5234394) and welcome to the community!

You can use a submodule for this purpose. In a clone of repository A, check out the branch where you want to have repo B.

You can then use the following command

```
git submodule add -b develop git@bitbucket.org:workspace-id/repo-B.git xyz
```

where **workspace-id** is the id of the workspace that repo-B belongs to  
**xyz** is the name of the directory where the submodule will be saved

This command will create a directory named **xyz**, and the branch develop of repo-B will be cloned in this directory.

Please keep in mind that the commits of "develop" branch of repo-B will not be part of the repo's A history.  
A submodule allows you to keep a Git repository (repo B in your case) as a subdirectory of another Git repository (repo A). So, the history of "develop" branch of repo-B will be inside the xyz directory.

You can find more info about how to work with submodules on the official Git documentation here:

* <https://git-scm.com/book/en/v2/Git-Tools-Submodules>

Is this something that works for you?

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud

commit

git

repository

submodule

transfer
How to make the webpage hosted on bitbucket only available to those with permissions to the repo
Asked by Pratibha Shah:

Following the instructions on this link to host a webpage on bitbucket

<https://support.atlassian.com/bitbucket-cloud/docs/publishing-a-website-on-bitbucket-cloud/>

However I would like to make the webpage hosted only available to those with permissions to the repo. Is it possible ?


Answers:
author: Mark C
body: Hi [@Pratibha Shah](/t5/user/viewprofilepage/user-id/1529369),

Thank you for reaching out to the community.

I understand that you'd like to restrict a static website hosted in Bitbucket Cloud.  
Unfortunately, this is not possible at the moment and for that, I went ahead and created a feature request for it that can be located through this link. - <https://jira.atlassian.com/browse/BCLOUD-22702>  
You can upvote and watch it for now so that you'll be notified of any updates from our team when the feature becomes available on Bitbucket Cloud.  
![](https://getsupport.atlassian.com/images/icons/emoticons/information.png) Please do note that we don't have an exact ETA for the feature request as all new features will be implemented according to our policy [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html).

As a workaround, you may want to consider the following:

* [Bitbucket Cloud Wiki pages](https://support.atlassian.com/bitbucket-cloud/docs/create-a-wiki/)
* [Using Confluence](https://www.atlassian.com/software/confluence)

Regards,  
Mark C


Tags: bitbucket-cloud

cloud
Unable to clone git repo - remote: Can't locate IO/Socket.pm:
Asked by kanagaraj pandian p s:

Currently our bitbucket server is hosted on RHEL 8.7. We started getting the issue as we upgraded from RHEL 7.9 to RHEL 8.7. When I am trying to clone git repo from our bitbucket server, I am getting the below error:

$ git clone -v [https://bitbucket.com/scm/pythoncode.git](https://bitbucket-dev.glb.syfbank.com/scm/~212313601/pythoncode.git)  
Cloning into 'pythoncode'...  
POST git-upload-pack (185 bytes)  
POST git-upload-pack (212 bytes)  
remote: Can't locate IO/Socket.pm: /usr/local/lib64/perl5/IO/Socket.pm: Permission denied at /appbin/atlassian/application-data/bitbucket/bin/git-hooks/hook-callback.pl line 15.  
remote: BEGIN failed--compilation aborted at /appbin/atlassian/application-data/bitbucket/bin/git-hooks/hook-callback.pl line 15.  
remote: aborting due to possible repository corruption on the remote side.  
fatal: early EOF  
fatal: fetch-pack: invalid index-pack output

Can you please let me know how this issue can be resolved?


Answers:
author: Aron Gombas _Midori_
body: The error suggests that the repositories on the server-side are broken. I mean the bare repositories that are in the filesystem of the server that runs Bitbucket.

You should check if the **/application-data** directory in the Bitbucket home was moved correctly.

comments: author: kanagaraj pandian p s
body: Hi [@Aron Gombas _Midori_](/t5/user/viewprofilepage/user-id/502447) , thanks for the reply.

Can you please elaborate on the '/application-data directory in the Bitbucket home was moved correctly.'? I am not able to understand clearly as we have done the OS update and not bitbucket update.


Tags: bitbucket-server

server
I am unable to connect snyk to this workspace
Asked by Faye Buchanan:

I have followed the instructions for adding the Snyk security through Jira but this workspace does not show up when linking to it.  
I've tried adding the Snyk app to the workspace through the Bitbucket security tab and the marketplace, but the button either doesn't work or gives me a 404. I am unsure where to go next to fix this or if it is some kind of permissions issue as every other workspace shows up.

Thanks in advance!


Answers:
author: Syahrul
body: G'day [@Faye Buchanan](/t5/user/viewprofilepage/user-id/5234026) and Welcome to the community

This seems like a situation where you are trying to install an integration in a personal workspace. For your information, only the owner of the personal workspace has the authority to install an integration.

This limitation exists in a Personal workspace only. Therefore, I recommend that you request the workspace owner to install the integration since regular users added to the workspace can't do so.

I hope this helps.

Cheers,  
Syahrul


Tags: bitbucket-cloud

cloud

jira

snyk
Unable to login Bitbucket - "We couldn?t log you in"
Asked by Derek May-West:

After numerous attempts logging in and out, clearing cache, disabling extensions, and changing browsers I have been unable to use my Atlassian account log in to Bit Bucket.

I am getting the following error message:

"You may run into this issue when you use specific browsers or add-ons that hide the referer header for id.atlassian.com and other Atlassian sites. Check for these and then try logging in again."


Answers:
author: Theodora Boudale
body: Hi Derek and welcome to the community!

Your Bitbucket Cloud account was deactivated, which is the reason for the error you were seeing.

I went ahead and reactivated it, could you please check if you are able to log in now?

Kind regards,  
Theodora

comments: author: Derek May-West
body: I am now able to log in; thanks!


author: Theodora Boudale
body: That's good to hear, thank you for the update!

Please feel free to reach out if you ever need anything else.


author: mRaj
body: try logging into a different browser I'm saying because of Trello happens to be like this


Tags: bitbucket-cloud

cloud
fatal: Could not read from remote repository.
Asked by gesslar:

Note: This was all working fine yesterday.

I have three different machines that connect to bitbucket and on all of them I am unable to git pull/push.

On each of them, I get the following:

```
An unexpected error occurred
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
```

I've done the instructions on all machines from <https://bitbucket.org/blog/ssh-host-key-changes>.

On all of them I get the correct response from Bitbucket

```
~/.ssh $ ssh git@bitbucket.org host_key_info
You are using host key with fingerprint:
ecdsa-sha2-nistp256 SHA256:FC73VB6C4OQLSCrjEayhMp9UMxS97caD/Yyi2bhW/J0

See https://bitbucket.org/blog/ssh-host-key-changes for more details.
```

I thought maybe it was my access keys, so, I tried \`ssh -T git@bitbucket.org\` (from <https://support.atlassian.com/bitbucket-cloud/docs/set-up-personal-ssh-keys-on-linux/>) on all of my machines and they all return

```
~/.ssh $ ssh -T git@bitbucket.org
authenticated via ssh key.

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

The status page doesn't indicate anything is down, so, I'm confused.


Answers:
author: gesslar
body: Of course, as soon as I walk away, I get an email...

![](https://cdn.discordapp.com/attachments/824786755320021032/1113994413677482004/Screenshot_20230601-205601.png)


Tags: bitbucket-cloud

cloud
Can't log into Bitbucket on any machine/browser
Asked by revinary:

Hi there,

I can't seem to log into my Bitbucket account anymore.

Instead, I see a error message saying  
*"**We couldn't log you in***   
*You may run into this issue when you use specific browsers or add-ons that hide the referer header for id.atlassian.com and other Atlassian sites."*

Jira seems to be working just fine.

Can you help me out?

<br />

Cheers!


Answers:
author: Theodora Boudale
body: Hi [@revinary](/t5/user/viewprofilepage/user-id/5233740) and welcome to the community!

Your Bitbucket Cloud account was deactivated, which is the reason for the error you were seeing.

I went ahead and reactivated it, could you please check if you are able to log in now?

Kind regards,  
Theodora

comments: author: revinary
body: I'm able to log in now :-)  
Thanks a bunch [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) !


author: Theodora Boudale
body: That's good to hear and you are very welcome [@revinary](/t5/user/viewprofilepage/user-id/5233740)!

Please feel free to reach out if you ever need anything else!


Tags: bitbucket-cloud

cloud
Pull Request unique identifier
Asked by miq68:

![2023-06-01_20-51-46.png](https://community.atlassian.com/t5/image/serverpage/image-id/260822i4A12CB7015504C6F/image-size/large?v=v2&px=999 "2023-06-01_20-51-46.png")

Hi

When a Pull Request is created a unique identifier is also created.

Can anybody confirm which one it is in the Screenshot?


Answers:
author: Mikael Sandberg
body: The Id for the pull request in the picture is 541, to id under it is the short commit Id.

comments: author: miq68
body: Thanks.


author: Travis Eno
body: In addition to Mikael's answer, it can be helpful to know that the pull request id is only unique within the same repository.   

From the API documentation -\>[Link](https://confluence.atlassian.com/bitbucket/pullrequests-resource-423626332.html?focusedCommentId=734071465)  

|------|--------------------------------------------------------------------------------------------------------------|
| `id` | The pull request's unique ID. Note that pull request IDs are only unique within their associated repository. |

comments: author: miq68
body: Hi

Thanks for further input.

I think it is the one that I need as a value to a parameter, which is used to automatically detect and scan a Pull Request in SonarCloud.


Tags: bitbucket-cloud

cloud
how to find how override by code
Asked by Suresh thogari:

I have committed some code in my branch. i am able to see in bitbucket portal.

after that when checked my code, my code was removed and i try to find out who done that. but none of the commit is showing the override code.

i would like to know how that is possible. is there any way to commit the code or change the code in bitbucket and will not show in commit section.

please answer.


Answers:
author: Erez Maadani
body: Hi [@Suresh thogari](/t5/user/viewprofilepage/user-id/5233578)

There are few creative/destructive ways to "silently override code":

1. Delete a whole file.
2. Swap file names.
3. git reset --hard // DO NOT TRY THIS

And more...

To find the changes, you can try:

1. BitBucket UI, which allows you to select a file and compare its relevant commits.
2. Your IDE - some ide, allow you to get history for code selection.
3. Git client - use the command "git log -G \<regex\> path/to/file" to find which commits contain your lost code. You can also add "-c" to get more details.

My personal recommendation is #3

comments: author: Suresh thogari
body: Hi [@Erez Maadani](/t5/user/viewprofilepage/user-id/5018344) ,

thanks for your reply could you please provide detailed command which you mentioned in point number 3.

git log -G \<what is this regex\> and what is the path like are you expecting like D:\\....\\..java something like that..?


author: Erez Maadani
body: Hi [@Suresh thogari](/t5/user/viewprofilepage/user-id/5233578)

The regex is a string pattern which describes some of your lost code.

For example, if your lost code includes the line:

```
console.log("my-lost-code")?
```

in a file named: "my-lost-file" in the root directory, running the command:

```
git log -G "my-lost-code" my-lost-file
```

Will output all the commits which their diff contains lines with "my-lost-code" in the file "my-lost-file", including the commit the line was removed.

It's been a while working with windows paths, but depends on your terminal/git client, it will either be "D:\\...\\..java" or "/D/.../..java". You can also use the "--relative" flag to avoid using full paths. See here for more details: <https://git-scm.com/docs/git-log>


author: Suresh thogari
body: I am using your command, but nothing is printing in console. will generate any log fil with the command which you given, if yes where can i get the log file. i checked everywhere but did not find.


Tags: bitbucket-cloud

cloud
Why doesn't my bitbucket pipeline badge dont work?
Asked by Lucaszapater:

I just finished building a repository and i want to show a badge of passing . The issue is that with this link '<https://img.shields.io/bitbucket/pipelines/antoniopz/javaschoolexam/master>' the build seems to not exist, but it does and is successful.  
The badge shows as not found, but if i try to go to '<https://bitbucket.org/antoniopz>' or '<https://bitbucket.org/antoniopz/javaschoolexam>' it work so i dont know if the problem is with my username, my project or with the branch.


Answers:
author: Theodora Boudale
body: Hi [@Lucaszapater](/t5/user/viewprofilepage/user-id/5233345),

I can see the badge of passing when I go to the link you provided.

Are you still experiencing issues with this?

Kind regards.  
Theodora


Tags: bitbucket-cloud

cloud
SourceTree, is there option for uncheck all pending files at start by default ?
Asked by artikow:

When you have uncommitted changes, by default sourcetree will make checked all modified pending files and un-checked all new files and I have to click check/un-check all to make all pending files unchecked. Is there option to make this uncheck all pending (new or modified) files by default ?

my problem is: sometimes i have a large monorepo, several month ago I modified some files on project Z and forgot, and project Z is at the bottom of repository (you will have to scroll down far to see this files), and of course still not commit this one (I don't want to stash this), and today I modify project A (on top of repository), and of course I will use filter to make easier to find project A, click this and that and voila, the files on project Z is also committed (and pushed :scream: ) so this feature option will help a lot


Answers:
author: bgannin
body: Hi [@artikow](/t5/user/viewprofilepage/user-id/2915193),

You can use the checkbox at the top of the column (outside the list) to toggle them all on or off at once. That would alleviate accidental commits, but isn't automatic. There's no preference for that in particular. Please search and vote for an existing ticket or create a new one so others can ([Windows](https://jira.atlassian.com/browse/SRCTREEWIN), [Mac](https://jira.atlassian.com/browse/SRCTREE)). This helps us prioritize when planning releases.

Thanks,

Brian Ganninger  
Principal Developer, Sourcetree

comments: author: artikow
body: Hi [@bgannin](/t5/user/viewprofilepage/user-id/744444)

Thanks for your answer, btw I think this one is similar to what I want <https://jira.atlassian.com/browse/SRCTREE-2528>

Thanks,
Cannot install on Mac, have read all the related topics. Please contact me.
Asked by Susan Korgen:

The bitbucket account terms of service are not acceptable to my employer. I need to get past this to install the product. Please contact me a.s.a.p. We have Confluence and JIRA, why can't I simply install Sourcetree as in the past?


Answers:
author: bgannin
body: Hi [@Susan Korgen](/t5/user/viewprofilepage/user-id/2914183),

The last time the app was available without an email login during setup was more than three years ago. Back then it still required an Atlassian account and a generated license after seven days.

There are no alternative options to registering Sourcetree for free with Atlassian beyond using Bitbucket Cloud or Bitbucket Server. Several tickets are tracking this already and it remains on our radar but no workarounds are available currently.

Brian Ganninger  
Principal Developer, Sourcetree


Tags: mac
UI bug/misconcept columns not resizing
Asked by Daniel Wendler:

As mentioned here <https://community.atlassian.com/t5/Sourcetree-questions/SourceTree-UI-30-less-information-in-commit-view/qaq-p/1038362>

I upgraded from ST2 to ST3 and the UI has gotten worse. I don't understand your decisions to turn something good into something so bad. (I am on OSX).

Now I have this problem: The columns in the commit view don't scale/resize proportionally like ST2 did. They don't resize at all. I have to manually adjust them or scroll like in windows 95.

This is so annoying - I'm working with many windows and stuff and I never keep my windows the same size. I am a developer!

Please please please, hear me, and stop making the UI worse with each release.

Alternatively, please apply security updates to ST2 and let me use that... whoever is making the UI decisions in ST3, please stop.


Answers:
author: bgannin
body: Please [file a ticket](https://jira.atlassian.com/browse/SRCTREE) about your issue with column resizing.
How to search a feature branch in remote
Asked by Shilpi Narang:

Is there is any search bar to search for any branch located remotely


Answers:
author: bgannin
body: Hi [@Shilpi Narang](/t5/user/viewprofilepage/user-id/2909739),

There isn't functionality for this currently but you can vote on/watch appropriate tickets in our public trackers ([Mac](https://jira.atlassian/browse/SRCTREE), [Windows](https://jira.atlassian/browse/SRCTREEWIN)) for it. These help signal what functionality the community is asking for as we prioritize our roadmap.

Brian Ganninger  
Principal Developer, Sourcetree
SourceTree UI 30% less information in commit view
Asked by Daniel Wendler:

Because of security issues I was updating today **from SourceTree 2.3.1** to **Sourcetree 3.1.1**

Looking at the main panel showing the list/table of commits, I was suprised that again the line height/row height has increased, resulting in yet less information getting displayed. This is something that has gotten worse year by year.

Please reduce the line height / row height of the commits view to show more information consuming less viewport space.

Or at least, give us some option to customize stuff like this.

Putting the windows of both version exactly next to each other, the ST2 displays 19 rows where at the same time ST3 only displays 13 rows.

**That's 30% less information within the same space.**

Nobody needs this extra space, it's a waste and I have to scroll more and more to get to see the information I need.

Please finally revert this nonsense.

![Screen Shot 2019-03-21 at 13.07.58.png](https://community.atlassian.com/t5/image/serverpage/image-id/49260iC83BE721FB45F93C/image-size/large?v=v2&px=999 "Screen Shot 2019-03-21 at 13.07.58.png")


Answers:
author: bgannin
body: [@Daniel Wendler](/t5/user/viewprofilepage/user-id/732865)

Thank you for your feedback. Please vote on and watch [this ticket](https://jira.atlassian.com/browse/SRCTREE-5154) for updates.

Brian Ganninger  
Principal Developer, Sourcetree
Missing Start Feature right after Gitflow init
Asked by Jan To?ovsk?:

When Gitflows in the new repository is initialized via Sourcetree (3.1.2), on one computer it doesn't offer Start Feature, but Finish Feature option. If the Start Feature is selected from Other Actions dialog, it seems to be working, but the status of the repository is somehow affected. This feature branch cannot be merged. And also other starting/finishing operations (e.g. start Release) are confused.

Everything works correctly on another computer. Is there any Gitflow status which could be somehow reset?

Win 10 64-bit, Git 2.21


Answers:
author: minnsey
body: Hi  

Is it possible the git-flow state was already committed and then pull from another user?  

You can see what git-flows underlying view of the state of the repository from the command like, e.g.  

\>Git flow feature list  

etc see <https://github.com/nvie/gitflow/wiki/Command-Line-Arguments>  

Sourcetree will show options depending on what it sees as the current state of the repository, I.e. if it believes the current branch is an open feature then the options it shows by default will be those to do with completing that feature.  

Is that repository on that workstation on a feature branch?

comments: author: minnsey
body: FWIW When clicking the Git-Flow button Sourcetree should be comparing the name of the current branch against the various prefixes, hotfix/, feature/ etc and then using that match or lack of it to decide what options to show.


author: minnsey
body: So far we've only been able to reproduce this with Git 2.21.0, potentially it is a change it that. Can you confirm that it works with Git \< 2.21.0 ?


author: David Keaveny
body: I'm currently using the System Git version 2.21.0/LibGit2Sharp 0.25.4 + git-lfs v2.7.1. If I switch to the embedded version, which is 2.20.1/LibGit2Sharp 0.25.4 + git-lfs v2.6.1, then the Finish Hotfix menu action appears. I haven't tried it yet, because I haven't finished the hotfix yet, but just the fact that it is there now when it wasn't before gives me a bit of confidence.


author: Jan To?ovsk?
body: I can confirm it works fine if Git is downgraded to 2.20 version (embedded one). It is indeed the only difference between both computers.


author: minnsey
body: Thanks for confirming, we are continuing to investigate.


author: minnsey
body: It looks like an update to fix this should be on its way via Git for Windows <https://github.com/git-for-windows/git/issues/2139>


Tags: git-flow
Sourcetree on OSX not working after enabling Two Factor Authentication
Asked by Chris Goane:

I updated my Bitbucket account to 2FA. Now I can no longer Push files using Sourcetree. I get the errors: 'Authentication Failed' \& 'Invalid Username or password'.

Following the suggestions of other posts, I updated Git to the latest. Still no luck.

Does anyone have any ideas? This is my system:

OSX ver: 10.14.3

Git (neither work):

Internal: 2.20.1

System: 2.21.0

Sourcetree: 3.1.1 (213)

thanks


Answers:
author: bgannin
body: Hi [@Chris Goane](/t5/user/viewprofilepage/user-id/818624),

Please try the following and let me know if it works out or fails.

1. Switch to "Embedded Git" *(2.21.0 is not verified yet with ST)*

2. Remove your Bitbucket Cloud account in Preferences -\> Account

3. Re-add your account*(optionally restart ST beforehand, shouldn't be necessary)*

Our apologies for the hiccup.

Brian Ganninger  
Principal Developer, Sourcetree

comments: author: Chris Goane
body: Yes, this worked like a charm. BTW, my System Git is 2.21.0.

Thanks for your help.


Tags: 2-factor-authentication

mac