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
Accepted answer

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: http://mercurial.selenic.com/wiki/LockExtension

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 Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

433 views 6 9
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