GIT projects support multiple remote repositories at the same time
To prevent GitHub from being a wall, it is best to make a backup at a domestic custodian, which requires simultaneous submission to multiple remote repositories, such as an open source project that commits both CSDN and Github,url respectively.
- [Email Protected]:lutaf/auto-complete.git
- [Email Protected]:lutaf/autocomplete.git
The method is very simple, a total of 4 steps
First step: Add remote information
git remote gh [email protected].com:lutaf/auto-complete.git
git remote cn [email protected].csdn.net:lutaf/autocomplete.git
Step two: Establish a separate branch for each warehouse
git checkout -b github
...
git checkout -b csdn
Step Three: Complete the development on the respective branch and submit
Fourth step: Push the local branch to the master branch of the remote repository
git checkout csdn
git push cn csdn:master
The fourth step is critical and must be pushed to the master branch of the remote repository
GIT projects support multiple remote repositories at the same time