Author: Yingxiao Yan
# Migrating projects
Sometimes it gets messy when transfering project from one repository to another. Here are some non-coding based steps of tansfering a branch from first repository gitlab https://gitlab.com/CarlBrunius/MUVR/-/tree/MUVR2?ref_type=heads to second repository github https://github.com/MetaboComp.
This procedure is not transfering project directly. But to build an empty project in one repository and copy paste in the project from another repository
## 0. prerequisite
You need to have username and password of both repositories.
For MetaboComp the user name is chalmerscompmetabolomics@gmail.com and the password is Pro1337Haxx0r
## 1. Delete something that has the same name in your second repository
* Click the repository -->Click settings --> scroll down to the "Danger zone" --> delete the repository
* Another option is to rename the repository: Click the repository -->Click settings --> General --> rename
## 2. Create the new empty repository and import
* Click the up right corner and build a new repository. Give it a name you want.
* After building the new repository, click in the the project and click in "...or import code from another repository".
* Paste in the URL. Note that the URL should be a master/default branch, such as https://gitlab.com/CarlBrunius/MUVR.git, not a non-master/default branch such as https://gitlab.com/CarlBrunius/MUVR/-/tree/MUVR2?ref_type=heads (It will not work).
* Begin import
## 3. Delete and rename branches
* If you have mutiple branches, all the branches will be imported as your old repository. Click "master" --> click "View all branches".
* You could delete and rename the branches by clicking the small logos and the upright corner.
* To change the default branch. Go to settings, click "switch to default branch" and set it up in the defaule session.

Done