Commit 658b8eb5 authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Update file locking docs

parent 99b500f3
# File Lock # File Locking
>**Note:** >**Notes:**
This feature was [introduced][ee-440] in GitLab EE 8.9. - [Introduced][ee-440] in [GitLab Enterprise Edition Premium][ee] 8.9.
- This feature needs to have a license with the "File Lock" option enabled. If
--- you are using Enterprise Edition Premium but you don't see the "Lock" button,
ask your GitLab administrator.
>**Note:** File Locking helps you avoid merge conflicts and better manage your binary files.
This feature needs to have a license with the "File Lock" option enabled. If Lock any file or directory, make your changes, and then unlock it so another
you are using Enterprise Edition Premium but you don't see the "Lock" button, member of the team can edit it.
ask your GitLab administrator. Check GitLab's [pricing page] for more information.
## Overview ## Overview
GitLab gives you the ability to lock any file or directory in the repository tree Working with multiple people on the same file can be a risk. Conflicts
reserving you the right to make changes to that file or directory. **Locking only when merging a non-text file are hard to overcome and will require a lot
works for the default branch you have set in the project's settings** (usually of manual work to resolve. With GitLab Enterprise Edition Premium, File
`master`). Locking helps you avoid merge conflicts and better manage your binary
files by preventing everyone, except you, from modifying a specific file
or entire directory.
## Use-cases ## Use-cases
...@@ -25,7 +27,7 @@ The file locking feature is useful in situations when: ...@@ -25,7 +27,7 @@ The file locking feature is useful in situations when:
conflicts. conflicts.
- Your repository contains binary files in which situation there is no easy - Your repository contains binary files in which situation there is no easy
way to tell the diff between yours and your colleagues' changes. way to tell the diff between yours and your colleagues' changes.
- Prevent design assets from being overwritten - Prevent design assets from being overwritten.
Locked directories are locked recursively, which means that everything that Locked directories are locked recursively, which means that everything that
lies under them is also locked. lies under them is also locked.
...@@ -64,6 +66,10 @@ is locked. ...@@ -64,6 +66,10 @@ is locked.
## Locking a file or a directory ## Locking a file or a directory
>**Note:**
Locking only works for the default branch you have set in the project's settings
(usually `master`).
To lock a file, navigate to the repository tree under the **Repository > Files** tab, To lock a file, navigate to the repository tree under the **Repository > Files** tab,
pick the file you want to lock and hit the "Lock" button. pick the file you want to lock and hit the "Lock" button.
...@@ -97,5 +103,5 @@ locks and [remove the ones you have permission for](#permissions-on-file-locking ...@@ -97,5 +103,5 @@ locks and [remove the ones you have permission for](#permissions-on-file-locking
![Locked Files](img/file_lock_list.png) ![Locked Files](img/file_lock_list.png)
[ee-440]: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/440 "File Lock" [ee-440]: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/440 "File Lock"
[pricing page]: https://about.gitlab.com/pricing [ee]: https://about.gitlab.com/gitlab-ee/
[push access]: ../../user/permissions.md [push access]: ../../user/permissions.md
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment