I think this is a new buy noticed moving from 11.x to 12.x and is present in latest 12.4.3.
We have a Dockerfile in various subdirs in the repo, and today when editing one in the Gitlab UI, when I save/commit it, I was astonished to find it had been moved to the root of the repo!
Turns out the editor does this only for the Dockerfile, not other files, it seems because the top of the editor changes as it recognizes that a Dockerfile template might be useful, so it has a drop down for that and other files; a bit weird.
- Have Dockerfile in subdir of repo
- Nagivate to view the file contents
- Click edit
- Make change in editor (note top of page no longe shows subdir path, instead shows template name)
- Click Commit Change at bottom
- See the file has moved to the root of repo
Note we don’t use templates.