Is there any file locking process in bitbucket?

If more than one users want to change same file at a time, then how can one user lock the file before it's use. Also another user who wants to change the same file, how he knows about  the file status, is it locked by any user or not.

2 answers

Hi Guy,

the question is now on year old... What about this feature!?? We need because my team used in the past a system that prodived this feature and they absolutly want to have it too on Bitbucket server. It is still a must even when the git purist mind it is not necessary.

May be as a motivation. Gitlab already implement it: https://about.gitlab.com/2016/06/22/gitlab-8-9-released/

 

Best regards,

 

Ndongmo. 

Hi Swati,

Git (the most popular version control system supported by Bitbucket) doesn't natively support file locking, so neither does Bitbucket.

However, the Bitbucket team have announced that they intend to launch support for a Git extension named Git LFS (Large File Storage). LFS doesn't yet support file locking but has an outstanding proposal to include it in a future release, so you may see Bitbucket supporting locking in some form in the future.

cheers,

Tim

Yes, as Tim said. It's important to understand that Git and Mercurial use an optimistic concurrency model that lets multiple users freely change the same set of files. Git then (almost) automatically merges your changes. This model is very different from lock-based version control systems like (now discontinued) Visual Source Safe where developers lock files so that only one developer can change a file at any one time.

The optimistic concurrency model is good if you are not dealing with binaries.  How do you manage files similar to Word .doc files?  This is for more than just .doc files, but it is a good example.  How soon is the LFS system going to be available.

Thanks,

Gus

Yepp. we also need such a locking feature to be able to avoid simultanous changes of binary files like MS excel.

Git and Mercurial don't have any means to accomplish this, nor are there any plans to offer this AFAIK. However, it would be possible for a hosting service like Bitbucket or GitHub to build something on top of it, like what Gitolite has done: http://gitolite.com/gitolite/locking.html

If this is something you'd want us to implement, please head over to our issue tracker and raise a feature request: https://bitbucket.org/site/master/issues/

Hi ,

We are using bitbucket 4.10.2 with LFS enabled.
Could any one help how can we make use of the feature "File Locking" with LFS enabled ?

Regards
Anil

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

27,060 views 26 12
Join discussion

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