Requirements: Migrate the Git repository and keep historical commit records
1. Clone a bare repository from the original address
git clone --bare https://gitee.com/kimisme/crm.git
2. Create a new project on the Git server, crm_bak
mkdir crm_bak.git
git init --bare crm_bak.git
3. Upload the code to the Git server by mirror push
cd crm_bak.git
git push --mirror https://gitee.com/kimisme/crm_bak.git
4. Delete native code
cd ..
rm -rf crm_bak.git
5. Clone the crm_bak project to the local
git clone https://gitee.com/kimisme/crm_bak.git
6. Switch remote_url
git remote set-url origin https://gitee.com/kimisme/crm_bak.git