Git repository migration

Source: Internet
Author: User

Recently, the local server installed with GIT has crashed, and there is no way to temporarily migrate the repository to ensure the normal operation of the project.

Right-click the project root directory and execute

Query the remote address of the current Warehouse

Git remote-V: view the URL of an existing remote Repository

 

Modify and add remote addresses
1. Modify the command git remote set-URL origin URL to replace the remote repository address, and change the URL to a new URL address.

2. Delete and add

Git remote RM Origin
Git remote add origin remote_git_address (remote_git_address)

Re-Add the file to be submitted (Project)

Git add.

Push the file to the Branch

Git push Origin -- all push master and branch

Git push -- tags push tag

 

Https://www.jianshu.com/p/712ed12d599c

Https://www.cnblogs.com/xhf-wonder/p/6728967.html

Git repository migration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.