youngmon/atlassian-qna huggingface dataset:
Exclude all files from pull request in a directory except specific directory
Asked by Avishay Guttman:

Hi,

I'm trying to use the [exclude files from diff](https://support.atlassian.com/bitbucket-cloud/docs/exclude-files-from-pull-request-diffs/) feature to exclude specific files/directory in a directory, **except** one directory.

Say I have a directory A with sub directories B,C,D:

- A  
-- B  
-- foo.go  
-- bar.go  
-- C  
-- c.go  
-- D  
-- d.go  
x.go  
y.go

I want to match everything in A (also the files x.go, y.go), except C and it's content. In .gitignore I would do something like this:

```
root/A/*
!root/A/C
!root/A/C/**
```

But it doesn't seems to work as a bitbucket exclude pattern. Is there a workaround for this?

Thanks in advance,

Avishay


Answers:
author: Theodora Boudale
body: Hi Avishay and welcome to the community.

I'm afraid that there is no way to negate a pattern in the Excluded files, this is also mentioned in the documentation you linked.

The workaround would be to match all files and directories that you want to be excluded. If the files x.go and y.go are in the A directory, you can exclude the following:

```
/A/B/**
/A/D/**
/A/y.go
/A/x.go
```

If the files x.go and y.go are in the root directory and not inside A, as follows:

```
/A/B/**
/A/D/**
y.go
x.go
```

Kind regards,  
Theodora

comments: author: Avishay Guttman
body: Hi Theodora,

The thing is that the content I want to exclude is *generated* content (this is usually the kind of content you want to exclude from diff).

Think about the following: you have directory A, and inside a directory C that contains code responsible for generating the rest of the code in A (dirs, files).  
So you want to see the code in C in PR, but the reset of the code is generated so you want to exclude it from diff.

Writing the the dirs/files explicitly is not practical as it dynamically changes.

Please consider adding this as a feature request, this pretty common scenario.


author: Theodora Boudale
body: Hi Avishay,

Thank you for the feedback and for explaining your use case.

I went ahead and created a feature request in our issue tracker:

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

I used your example to explain why this would be a useful feature.

Please make sure to add your vote to that feature request (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.

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) if you'd like to get notified via email on updates.

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,  
Theodora


Tags: bitbucket-cloud

cloud
repository about 4gb
Asked by H?ctor Fenoll Malonda:

Hello,  
In our repository the following notice has jumped us:  
"2.23 GB of 4 GB"  
We would like to ask for this:  
1 - Launch a GC at 2:00 am (GMT) on April29, 2022  
Thanks, best regards


Answers:
author: Caroline R
body: Hi, [@H?ctor Fenoll Malonda](/t5/user/viewprofilepage/user-id/4789664), thank you for reaching out to Atlassian Community.

I ran the GC against your repository and managed to reduce its size.

I also would like to share with you that we have a feature request to allow users to mark repositories for git GC, as you can check here:

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

Please consider adding yourself as a watcher to receive the updates as we make progress with this. If you are not familiar with our Feature Request Policy, you can read more about it [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html).

Feel free to share any additional questions or concerns regarding this case.

Kind regards,  
Caroline


author: H?ctor Fenoll Malonda
body: Hello,  
In our repository the following notice has jumped us:  
"3.79 GB of 4 GB"  
We would like to ask for this:  
1 - Launch a GC at 2:00 am (GMT) on April29, 2022  
Thanks, best regards


Tags: bitbucket-cloud

cloud
Can't access old bitbucket account
Asked by Sushil Wanjari:

Hello,

I have an old bitbucket account "\<username_removed\>" but I do not remember the email id with which I had registered the account. So, I am now unable to login to my bitbucket account as the login with username is no more allowed.

Please suggest how can I get access to my existing account.

Thanks in advance!


Answers:
author: Theodora Boudale
body: Hi [@Sushil Wanjari](/t5/user/viewprofilepage/user-id/4900163),

I would suggest trying to log in to bitbucket.org with any of the other email addresses you own, and then see if you are logged in to the account you are looking for. Due to our privacy policy, we cannot share the email of a Bitbucket account when someone reaches out to us with an email address not associated with said account.

If you try to log in with a certain email and you get asked to create a username, this means that there is no Bitbucket account with that email as primary, so you can skip the process and try a different email.

Just a heads up, I removed the Bitbucket username from your post to comply with our privacy policy.

Kind regards,  
Theodora

comments: author: Sushil Wanjari
body: Thanks for the reply!

I tried with all my mail ids, but it is prompting me to create a username. I am not sure if I had added any mail id to my Bitbucket account. Is it possible that there was no mail id associated with my account?

Regards,

Sushil


author: Theodora Boudale
body: Hi Sushil,

The account in question has an email associated with it.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Why the bitbucket diff is showing difference which is already present in the destination branch?
Asked by archana.bahadur:

Why the bitbucket diff is showing difference which is already present in the destination branch? This is quiet frequent now.


Answers:
author: Theodora Boudale
body: Hi [@archana.bahadur](/t5/user/viewprofilepage/user-id/4900054),

**1)** I see that your question has the tag 'bitbucket-cloud', but I do not see a Bitbucket Cloud account associated with the email of your community account. Could you please confirm if the issue concerns indeed Bitbucket Cloud (<https://bitbucket.org/>) or Bitbucket Server (self-hosted instance)?

**2)** If you run the following command locally

```
git diff destination_branch...source_branch -- /path/to/file.txt
```

where  
**destination_branch** replace with the name of your destination branch  
**source_branch** replace with the name of your source branch  
**/path/to/file.txt** replace with the path and name of the file in your repo whose diff doesn't show as you expect

Do you see the same diff for the file locally that you see in Bitbucket UI?

**3)** What is the kind of changes displayed in the diff (which shouldn't be there)?  
Is it addition of new lines in files?  
Removal of lines in files?  
Addition of a file?  
Or removal of a file?

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Massively script/set permissions on repositories ?
Asked by Yannick Biet:

Hello

We migrated 440+ repositories yesterday from server to cloud edition.

Is there a massive way to script/use a product to setup the permission scheme ?

On server, previously we setup the permissions on project level and so all repos inherited their permissions from the project permission scheme.

Now it seems I need to manually re-enter 440 permission scheme (99.99% will be the same)

Has anyone already faced the question ? Thanks for the help in advance


Answers:
author: Theodora Boudale
body: Hi Yannick,

You could use our API to script this. Version 2 of our API doesn't provide endpoints for user and group management, so we still offer temporary support to certain 1.0 API resources for that purpose.

On [this documentation page](https://support.atlassian.com/bitbucket-cloud/docs/groups-endpoint/), you can see the endpoints and examples for  
- creating a new user group  
- adding a member to a user group

[This page](https://support.atlassian.com/bitbucket-cloud/docs/group-privileges-endpoint/) includes the endpoint for adding a group to a repository.

If you have any questions specific to your use case, please feel free to let me know.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Hi all, want to integrate bitbucket in jenkins, but dont see option "personal access token" plz help
Asked by Dinesh Chandrawal:

Hi all, I want to integrate bitbucket with jenkins, but I don't see option "personal access token" in my manage account settings, can any one please help me.

I have created my bitbucket account using online i.e, bitbucket.org link,


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

Welcome to the Bitbucket Cloud Community!

When you are referring to "personal access token" are you referring to integrating Jenkins into Bitbucket Cloud via OAuth using an access token?  
If so, you will be able to generate an access token via our API using a combination of a client_id and secret, these are generated via **Workspace Settings \> Apps \& Features \> OAuth Consumers**

Further information regarding OAuth and generating an access key can be found in the following links:  
<https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/>   
<https://developer.atlassian.com/cloud/bitbucket/rest/intro/#authentication>

If you were referring to something else, please let me know what you are trying to achieve to make sure that we are on the same page.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
Authentication fails for existing local repositories
Asked by messier79:

Hi

Following the authentication method change from March 1st, I added a SSH Key to my account and added that key in Pageant.

I can clone a repo and push/pull, but for an already cloned repo, I cannot.

I have a few repos cloned locally and I cannot use them anymore.

I started cloning them again, but it takes time...

What needs to be done for the old repo to take the authentication changes?

I use TortoiseGit on Windows.

Thanks


Answers:
author: messier79
body: Thanks, I ended up checking out the repos again.


author: Theodora Boudale
body: Hi [@messier79](/t5/user/viewprofilepage/user-id/4898848),

If the existing repos are using HTTPS, you will need to change the remote URL for each of these local repositories from HTTPS to SSH.

I'm not very familiar with TortoiseGit, but somewhere in the repo's settings there should be a configuration option for Remote.

If the URL displayed there is an HTTPS one:

```
https://BitbucketUsername@bitbucket.org/WORKSPACE-ID/REPO.git
```

you should change it to the following, in order to use SSH:

```
git@bitbucket.org:WORKSPACE-ID/REPO.git
```

This is something you can also do from a command-line application.

Navigate to the directory of each repo, and run

```
git remote -v
```

If you see in the output

```
origin https://BitbucketUsername@bitbucket.org/WORKSPACE-ID/REPO.git (fetch)
origin https://BitbucketUsername@bitbucket.org/WORKSPACE-ID/REPO.git (push)
```

You can run the following command to change the URL of the remote to an SSH one:

```
git remote set-url origin git@bitbucket.org:WORKSPACE-ID/REPO.git
```

Kind regards,  
Theodora


Tags: bitbucket-cloud
Need help recovering deleted bitbucket repo
Asked by Pedro Miguel Duarte In?cio:

Hello,

I recently deleted the repository because I wanted to make a new one from scratch but for some reason visual studio deleted the files in my local machine

I've been trying to create a ticket but after filling in the questions, in the end it only appears "Getting help from the Atlassian Community" or "Check out our Jira Software how-to guides", Technical issues and bugs option

The repository (EP_Molgas) was deleted today (27-04-2022), If it is possible to recover it, could you create a ticket for me.

Thanks


Answers:
author: Caroline R
body: Hi, Pedro, welcome to the community!

I have created an internal ticket for you using the email of your community account.

You should have received an email with a link to the support ticket. Just in case you haven't received it, please feel free to let me know and I can post the ticket URL here. The ticket will be visible only to you and Atlassian staff, no one else can view its contents even if they have the URL.

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

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud
Problem: "Someone has already added that key as an access key to a repository."
Asked by s.gulenko:

When i'm trying to add SSH key i got error message:  
>
> ```
> Someone has already added that key as an access key to a repository.
> ```

when i type in terminal

```
 ssh -T git@bitbucket.org
```

i got a message

```
authenticated via ssh key.

?

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


Answers:
author: Caroline R
body: Hi, [@s.gulenko](/t5/user/viewprofilepage/user-id/4233738), thank you for reaching out to Atlassian Community.

As we will need to know the public ssh key to further investigate this case, I have created an internal ticket for you using the email of your community account, so you don't have to share this information here.

You should have received an email with a link to the support ticket. Just in case you haven't received it, please feel free to let me know and I can post the ticket URL here. The ticket will be visible only to you and Atlassian staff, no one else can view its contents even if they have the URL.

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

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud
What Signal Does Bitbucket Pipelines Send to a Step When a Pipeline is Stopped?
Asked by Johnathan Gilday:

When a Pipeline is running, and a user requests that it be [stopped](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pipelines/#api-repositories-workspace-repo-slug-pipelines-pipeline-uuid-stoppipeline-post), what exactly happens to any steps that are currently running? Do they receive a SIGINT? A SIGKILL? Is there a grace period before a SIGKILL? Is it configurable?


Answers:
author: Patrik S
body: Hello [@Johnathan Gilday](/t5/user/viewprofilepage/user-id/1198872) ,

When a pipeline is stopped, either by the API or UI, the running step will be stopped, and the running processes within that step will be forcefully killed, like a ***kill -9*** command, where it sends a SIGKILL to the processes and forces them to terminate.

Hope that helps to address your question.

Thank you, [@Johnathan Gilday](/t5/user/viewprofilepage/user-id/1198872) .

Kind Regards,

Patrik S


author: Eduardo Asenjo
body: I've never tried this before, but I wonder if the \`after-script\` is called on STOP as well or not.

<https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/#after-script>


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
I'm getting an error while running pipeline "fatal: Commit found,use 'git FTP push' to sync"
Asked by abidmaqbool:

fatal: Commit found, use 'git FTP push' to sync.  

bitbucket-pipelines.yml {#toc-hId--556577808}
---------------------------------------------

script:  
- echo "Your deployment to production script goes here..."  
- apt-get update  
- apt-get -qq install git-ftp  
- git ftp init -u $FTP_USERNAME -p $FTP_PASSWORD $FTP_URL  
I'm stuck on this error for 3 days. Please help


Answers:
author: Ben
body: G'day!

Welcome to the Bitbucket Cloud community!

Can you please try to add the following line to your bitbucket-pipelines.yml file temporarily and then run the step manually from **Repository \> Pipelines \> Run Pipeline**?

```
script:
- git ftp push
```

You can then edit the **bitbucket-pipelines.yml** file to remove this line if it executes successfully.

If this still does not work, please try to increase your clone depth if you have specified this depth manually, ignore this step if you have not set this manually.

Please let me know if this is successful, if not - we will need to create a ticket on your behalf so that you can share sensitive information that will assist us with this investigation further.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
How can I checkout a file from another branch?
Asked by ladislavmaxa:

Hi,

if I want to transfer all changes of certain file to another branch (not only cherry-pick), I'm doing it like this:

git checkout develop ./components/Modal.js

This command updates ./components/Modal.js with the changes from develop branch.

Is there a way to do this directly in SourceTree?

```
?
```


Answers:
author: Seth
body: No. This is definitely an advanced use case, and I imagine if Atlassian did implement a way to do it in SourceTree, we'd get far more questions like: "how did the version of this file from my other branch get into this one?" or "why did switching my branch only change one file?".
How can I work on magento based eCommerce site development using bitbucket/sourcetree?
Asked by Keshob Chakrabartty:

### Hello, me and my team are trying to develop an eCommerce site using **magento**. Previously, we built a lot of sites with the help of sourcetree/bitbucket. Now, we are facing a bit problem with this magento platform. Its huge and do not know we can develop our site in Bitbucket or not. Need suggestion from the exparts or the experienced developpers. {#toc-hId-1448103209}

### Thanks
Keshob {#toc-hId--1104053752}


Answers:
author: Scott Benson
body: When I thought about doing Magento development alone. But there is no particular sense in this, it is much more profitable (time and money) to turn to a team of professional developers ([https://whidegroup.com/magento](https://whidegroup.com/magento "https://whidegroup.com/magento") )


author: Nic Brough -Adaptavist-
body: Hard to say without knowing what a "magneto" site is. Is it a pile of text files that you consider to be "code"? Bitbucket will handle that fine.
How do I force Sourcetree to refresh Log/History commits?
Asked by CarlosMelo:

Sourcetree stop refreshing the log/history, and is not showing any new commits that have been done by my contributors. I set the auto refresh option to 5 minutes and I have refresh the view (F5) many times and it still doesn't work. I can see the changes on the repository from my Github Account, and it was working well until yesterday. I also made sure to have the last software update so I'm not sure what else I can do.   

Thanks for your help.


Answers:
author: Seth
body: You aren't looking for a "refresh", which checks your local repository for changes. You need to "Fetch". I assume the "auto refresh" you mentioned is "Check default remotes for updates every X minutes", which SHOULD be running a fetch on a regular basis.

If a manual Fetch doesn't get any changes, maybe something has happened to your remote config.

comments: author: CarlosMelo
body: Thanks Seth, I also tried that as well, but the problem ended up being something else. The partition disk where I had my repository was corrupted and although it allowed me to view all my files, I was not able to edit or delete them, that is why sourcetree wasn't able to merge the new commits or even check if my repository was up to date. and as soon as I fixed the hard drive, sourcetree started working perfectly.   

Thanks anyway.


author: Seth
body: Glad to help. I don't think anyone would reasonably suggest "maybe your hard drive is corrupted" as an initial troubleshooting step, but I'm glad you were able to identify and resolve it quickly.
Idiograms - what do they mean?
Asked by Donald Overlander:

Please make an EASY to find\\access description of any and all "Idiot Diagrams == IdioGrams" used in you application. One of THE biggest pet peeves is using acronyms without defining them... using icons (and lots of them) without providing easy access to their meaning is no different.

Yellow square with ellipsis == Edited File?

Purple square with question mark == I have no idea....

Red square with dash == Deleted file???

Seriously a major issue in why I am considering switching to a different tool.  
[](https://community.atlassian.com/t5/Sourcetree-questions/Idiograms-what-do-they-mean/qaq-p/387090?attachment-id=11769){#link_1172f28fde7438}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/11565/1/image2016-4-29%2010%3A54%3A44.png){#display_1172f28fde7438_0}


Answers:
author: Seth
body: If you understand Git/Mercurial and the various statuses a file can be in (which you should if you're using it), it is not hard to associate the icons with the possible states.

Here's the list for Git (taken from documentation for "git status"):

* ' ' = unmodified

* ? = untracked
* *M* = modified

* *A* = added

* *D* = deleted

* *R* = renamed

* *C* = copied

* *U* = updated but unmerged

I don't think SourceTree has special icons for the last two status, (and it doesn't show an icon for "unmodified"). Files can also be "conflicted" (git status shows two letters for conflicts/merges). Knowing that list, the icons seem pretty obvious to me:

git_status_summary.PNG  
[](https://community.atlassian.com/t5/Sourcetree-questions/Idiograms-what-do-they-mean/qaq-p/387090?attachment-id=12903){#link_1172f294f9762f}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/11566/1/git_status_summary.PNG){#display_1172f294f9762f_0}

comments: author: Seth
body: Also, the text for the status icons appears in a tooltip for the icons that are in the file list (but not the summary I depicted in my answer). Excuse the low quality screenshot:

image2016-4-29 10:54:44.png


author: IcarusTalon
body: I did not notice the tool tip. Good thing, the Icons are not intuitive. :\|


author: Seth
body: Just curious, what icons do you feel would be intuitive for that set of statuses?


author: Carlo Alfio Flores
body: The yellow Icon is the same for the *Modified* and *Clean* status(es). By the way, how do you remove from the unstaged files all the files with *Clean*status?
How to actvate spell checking in version 1.8.3
Asked by Thomas Schwarze:

I newly installed source tree. In options I checked to use english spell checking for commit messages. Nevertheless typographical errors aren't recognized in any way. What do I have to do to activate spell checking?


Answers:
author: Thomas Schwarze
body: In my case the solution was to add english language package for spellchecking in windows. By default Windows installation contains spellchecking for system language only.


author: Oliwer_Hawlicki
body: Same problem here. It never worked for me since the feature was introduced. Windows 10 64bit pro here.
Prompt for issue tracker ID in Sourcetree?
Asked by Adam Kaplan:

I came to git/Sourcetree from svn/TortoiseSVN. One of the nice features of Tortoise and other SVN clients is that you could configure the client to prompt for an issue tracker ID. This was especially useful for linking commits to JIRA tasks, and having the prompt ensured that team members tracked their commits to JIRA issues.

Sourcetree doesn't seem to support this. Human behavior being what it is, our team often forgets to enter JIRA IDs in their commit messages. We have the JIRA/Github integration turned on, and use that to automatically transition tasks. Without those JIRA ids, the integration isn't that effective.

Any plans to add this feature to Sourcetree?


Answers:
author: Seth
body: There are some related feature requests:

<https://jira.atlassian.com/browse/SRCTREEWIN-3617>

<https://jira.atlassian.com/browse/SRCTREEWIN-2168>

If they aren't quite what you are looking for, you can create your own.

comments: author: Adam Kaplan
body: Thanks - those are certainly related, but not exactly what I'm looking for.

I created a feature request per your suggestion: <https://jira.atlassian.com/browse/SRCTREE-3737>


Tags: jira-cloud