Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How can I fork a private bitbucket repository like github provides?

birju_vachhani September 5, 2019

Github provides this fork feature which lets user fork another person's repository to our own account which is like an independent copy of the repository. When we want to push code changes to the original repository, we can create a PR to merge our fork changes to the original repository. Unfortunately, I cannot find this feature with bitbucket.

1 answer

1 accepted

1 vote
Answer accepted
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 5, 2019

Hi there, welcome to the Community!

Bitbucket also provides the 'fork' option, you can achieve it by following the steps. 

  1. From the repository, click + in the leftmost global sidebar and select Fork this repository under Get to work.
  2. In the Fork dialog, define the options for your fork.

  3. Click Fork repository.

You can learn more about this feature at Forking a repository.

Don't hesitate to let us know if you have any questions.

Best regards,

Ana

birju_vachhani September 5, 2019

Thanks a lot :)

Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 6, 2019

Glad I could help!

Have a nice weekend,

Ana

Like birju_vachhani likes this
Charlie September 14, 2019

Hi Ana,

I want to fork a repo in bitbucket, but using bash command, not the GUI as you described in #1.  Is there a way to do that?

 

Thanks,

Charlie

Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 16, 2019

Hi @Charlie,

To give you the best guidance we'll need to know what are you trying to achieve. Do you just want a copy of the repository on your local machine (clone)? Or do you want a fork of the original repository, just not using the Bitbucket UI?

For the first case, you can achieve that just by using Git on your terminal. You can learn how in the documentation.

For the second case, you can do a fork the repository using the REST API, as documented at https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/forks.

Hope that helps!

Ana

Charlie September 16, 2019

Hi @Ana Retamal ,

Thanks for replying.

My goal is the latter: "want a fork of the original repository, just not using the Bitbucket UI".

I will try to follow the REST API to see what I can do.  I will get back to  you with questions, for sure.

Thanks.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events