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

Is there any file locking process in bitbucket?

Swati Goswami January 10, 2016

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

2 votes
Ndongmo January 19, 2017

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. 

0 votes
TimP
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 11, 2016

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

evzijst
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 11, 2016

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.

Gus Ray February 11, 2016

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

Christoph Waitz March 31, 2016

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

Like Rajasekhar Jonnalagadda likes this
evzijst
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 31, 2016

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/

Anil.Bulle June 20, 2017

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

Mark Strecker December 20, 2018

Bitbucket does not support the locking yet.
See BSERV-9623 for more information.

Besides that information, locking can be enabled by adding "lockable" to the filetype-line in the .gitattributes file. E.g.:
*.exe filter=lfs diff=lfs merge=lfs -text lockable

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events