I'm using Gitlab where I have a repository called reports under the path or group as https://example.gitlab.com/my_company/source_group which I want to move to another group on the same GitLab Instance as https://example.gitlab.com/my_company/target_group
The current repo URL is https://example.gitlab.com/my_company/source/reports.
Now, there are two methods that I can see that can help me to migrate this repository when I go to the Project Repository Settings -> General-> Advanced as Change Path and Export Project.
I do want to keep all the things related to my current repository, reports i.e. code, commit history, CI variables, token (if possible), tags, etc. I feel changing the path is easier in my case as I just want to move from one group to another since it is the same Gitlab instance. May I know three things:-
If I change the path, will I be able to revert to the source group later?
Is changing the path the right way to do in my case?
What are the drawbacks of using an exporting project and then importing as a new repository in a new group?
there are two methods that I can see that can help me to migrate this repository when I go to the Project Repository Settings -> General-> Advanced as Change Path and Export Project.
Neither of these approaches should be used for this scenario.
You should use the Transfer Project setting which is under the same Advanced section. However, you must have Owner permissions of the project to be allowed to transfer it. If you don't see this option, it's because you are not an owner. Additionally, you must have ownership rights in the namespace to which you are transferring the project.
See documentation: Transfer a project to another namespace