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

1 vote
Answer 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
Community showcase
Published Mar 14, 2019 in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

282 views 0 12
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