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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Only-Pull-from-Parent (with Rebase) and Only-Push-to-Origin (with Force)

Also let me know if we can configure Only-Pull-from-Parent (with Rebase) and Only-Push-to-Origin (with Force), without having the risk of accidental Pull/Push to the wrong repository

1 answer

0 votes

Hello @Sourav Kumar Sahu,

I'm not quite sure what constraints you want to set up and where, please elaborate on your use case.

On Bitbucket side you might make use of branch permissions (and obviously repository permissions).

Hope this helps.


Hi @Daniil Penkin ,


I have Parent repo and 2 forks Origin-pc1 & Origin-pc2. These forks are cloned into 2 different Local PCs. 


Now i want to configure

1) Only pull-rebase from Parent to Local

2) Only Force-push from Local to Origin

Ok, I think I got you.

So the configuration you're after is client-side, e.g. you'll have to configure Git clients on those local PCs.

  1. You might want to configure different fetch and push URLs (former used when pulling). Basically, you clone a repo from Parent (or set its URL via CLI), then update the push URL  to point to the relevant Origin (specifically, take a look at --push option of git remote set-url command).
  2. Configure Git client to pull with --rebase option. You might want to set an alias for that.
  3. Configure Git client to force push (although I'd suggest to go with --force-with-lease instead).

You might also want to restrict Parent from being modified in any way other than Pull Requests (again, you can do that with repository permissions and/or with branch permissions).

Hope this answered your question.


Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,880 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you