Commit b31b680c authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Refactor File lock documentation

- Move to new location according to
  https://gitlab.com/gitlab-org/gitlab-ce/issues/3349
- Use new images
parent 4b4ee4c8
# File Lock
>**Note:**
This feature was [introduced][ee-440] in GitLab EE 8.9.
---
>**Note:**
This feature needs to have a license with the "File Lock" option enabled. If
you are using Enterprise Edition but you don't see the "Lock" button,
ask your GitLab administrator. Check GitLab's [pricing page] for more information.
GitLab gives you the ability to lock any file or folder in the repository tree
reserving you the right to make changes to that file or folder. **Locking only
works for the default branch you have set in the project's settings** (usually
`master`).
The file locking feature is useful in situations when:
- Multiple people are working on the same file and you won't to avoid merge
conflicts.
- Your repository contains binary files in which situation there is no easy
way to tell the diff between yours and your colleagues' changes.
---
If you lock a file or folder, then you are the only one who can push changes to
the repository where the locked objects are located. Locked folders are locked
recursively.
Locks can be created by any person who has [push access] to the repository; i.e.,
developer and higher level. Any user with master permissions can remove any
lock, no matter who is its author.
## Locking
To lock a file, navigate to the repository tree under the **Code > Files** tab,
pick the file you want to lock and hit the "Lock" button.
![Locking file](img/file_lock.png)
---
To lock an entire folder look for the "Lock" link next to "History".
![Locking folder](img/file_lock_folders.png)
---
After you lock a file or folder, it will appear as locked in the repository
view.
![Repository view](img/file_lock_repository_view.png)
---
To unlock it follow the same procedure or see the following section.
## Viewing/Managing existing locks
To view or manage every existing lock, navigate to the
**Project > Code > Locked Files** section. Only the user that created the lock
and Masters are able to remove the locked objects.
![Locked Files](img/file_lock_list.png)
[ee-440]: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/440 "File Lock"
[pricing page]: https://about.gitlab.com/pricing
[push access]: ../../permissions/permissions.md
......@@ -8,7 +8,7 @@
- [Importing to GitLab](doc/importing/README.md)
- [Keyboard shortcuts](shortcuts.md)
- [File finder](file_finder.md)
- [File lock](file_lock.md)
- [File lock](../user/projects/file_lock.md)
- [Labels](labels.md)
- [Issue weight](issue_weight.md)
- [Manage large binaries with git annex](git_annex.md)
......
# File Lock
>**Note:**
This feature was [introduced][ee-440] in GitLab 8.9.
---
GitLab enables us to lock any file or path in repository tree. If you have a lock
then you are the only one who can push changes to the repository where locked objects are changed.
Locks can be created by any person who has access to push the code; i.e., developer and higher level.
The user with master permissions level can remove any lock, no matter who is the author of the lock.
## Locking
To lock any file or folder open it in GitLab Code viewer and you will see appropriate link or button
![Locking file](file_lock/file_lock.png)
![Locking folder](file_lock/folder_lock.png)
---
## Viewing/Managing existing locks
To view or manage every existing lock go to the **Project > Code > Locked Files** section.
![ocked Files](file_lock/locked_files.png)
---
## License note
To activate this feature you have to have a license with the "File Lock" option enabled.
---
[ee-440]: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/440 "File Lock"
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