Commit 59fe6f32 authored by Achilleas Pipinellis's avatar Achilleas Pipinellis Committed by Marcia Ramos

Update file locking docs

- Remove outdated 'introduced in' section
- Update/remove images
parent 8716eb0c
# File Locking **[PREMIUM]**
> - [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/440) in [GitLab Premium](https://about.gitlab.com/pricing/) 8.9.
> - This feature needs to have a license with the "File Lock" option enabled.
> - If you are using Premium but you don't see the "Lock" button, ask your GitLab administrator.
> [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/440) in [GitLab Premium](https://about.gitlab.com/pricing/) 8.9.
File Locking helps you avoid merge conflicts and better manage your binary files.
Lock any file or directory, make your changes, and then unlock it so another
......@@ -30,12 +28,51 @@ The file locking feature is useful in situations when:
Locked directories are locked recursively, which means that everything that
lies under them is also locked.
## Locking a file or a directory
NOTE: **Note:**
Locking only works for the default branch you have set in the project's settings
(usually `master`).
To lock a file:
1. Navigate to your project's **Repository > Files**.
1. Pick the file you want to lock.
1. Click the "Lock" button.
![Locking file](img/file_lock.png)
To lock an entire directory, look for the "Lock" link next to "History".
After you lock a file or directory, it will appear as locked in the repository
view.
![Repository view](img/file_lock_repository_view.png)
Once locked, any merge request to the default branch will fail
to merge until the file becomes unlocked.
## Unlocking a file or a directory
To unlock a file or a directory, follow the same procedure as when you locked
them. For a detailed view of every existing lock, see the next section on
"Viewing and managing existing locks".
You can unlock a file that yourself or someone else previously locked as long
as you have Maintainer or above [permissions](../permissions.md) to the project.
## Viewing and managing existing locks
To view or manage every existing lock, navigate to the
**Project > Repository > Locked Files** area. There, you can view all existing
locks and [remove the ones you have permission for](#permissions-on-file-locking).
## Permissions on file locking
The user that locks a file or directory **is the only one** that can edit and
push their changes back to the repository where the locked objects are located.
Locks can be created by any person who has [push access](../../user/permissions.md) to the repository; i.e.,
Locks can be created by any person who has [push access](../permissions.md) to the repository; i.e.,
Developer and higher level, and can be removed solely by their author and any
user with Maintainer permissions and above.
......@@ -61,41 +98,3 @@ accepts a merge request, an error message will appear stating that the file
is locked.
![Merge request error message](img/file_lock_merge_request_error_message.png)
## 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,
pick the file you want to lock and hit the "Lock" button.
![Locking file](img/file_lock.png)
---
To lock an entire directory, look for the "Lock" link next to "History".
![Locking directory](img/file_lock_folders.png)
---
After you lock a file or directory, it will appear as locked in the repository
view.
![Repository view](img/file_lock_repository_view.png)
## Unlocking a file or a directory
To unlock a file or a directory, follow the same procedure as when you locked
them. For a detailed view of every existing lock, see the next section on
"Viewing and managing existing locks".
## Viewing and managing existing locks
To view or manage every existing lock, navigate to the
**Project > Repository > Locked Files** area. There, you can view all existing
locks and [remove the ones you have permission for](#permissions-on-file-locking).
![Locked Files](img/file_lock_list.png)
doc/user/project/img/file_lock.png

26.3 KB | W: | H:

doc/user/project/img/file_lock.png

45.2 KB | W: | H:

doc/user/project/img/file_lock.png
doc/user/project/img/file_lock.png
doc/user/project/img/file_lock.png
doc/user/project/img/file_lock.png
  • 2-up
  • Swipe
  • Onion skin
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