Checkout files

I would like to indicate my teammates that I'm working with certain file(Checked Out) and do not want anyone else working on it until I CheckIn. Is this possible with Bitbucket?

2 answers

1 accepted

Bitbucket supports two different but similar distributed version control systems (DVCS) : git and mercurial. The both tools share the same design principle (internet has plenty of excellent tutorials) where reserving or locking a file is "unnatural" or "impossible" by design. I'm not aware any ways how that can be done in git but mercurial seems to have an extension that addresses the problem:

In general DVCSs don't suit well for non-mergeable (e.g. binary and unstable machine generated) files. If this is very common scenario in your team I'd suggest using Subversion (not supported by Bitbucket) instead.

This is absolutely correct. To add to that, the closest thing you can do that is supported by the DVCS is to create your own local branch, make all of your changes in that branch. When you are finished, merge it back to a shared branch (you may have to resolve conflicts if teammates have worked on the same file), and push the merge commit back to Bitbucket. I would go so far as to say this is the RECOMMENDED way to handle the situation.

Thanks for the information, Jani and Seth!

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

2,011 views 1 5
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you