This article is a mirror article of machine translation, please click here to jump to the original article.

View: 2466|Reply: 1

Push projects to multiple git repositories

[Copy link]
Posted on 2024-8-30 13:53:14 | | | |
Requirements: The project source code is hosted by git, and now the remote repository is address A, and now I want to push the project to address B as well.

First, check the remote warehouse address of the current project with the following command:



Then, use the git command to add a remote git address to the project (create a new repository at address B, omitted) with the following command:

As shown below:



Then, push to Repository B with the following command:

git push -f origin master
Note: origin remote repository name, master branch name, -f for force, meaning: force, force.
This line of command means to force local code to overwrite the code of the remote repository
Delete remote address command:

Reference:

The hyperlink login is visible.
The hyperlink login is visible.
The hyperlink login is visible.





Previous:ERP Kingdee Cloud Starry Sky (2) Document Query Dictionary (FieldKeys) export
Next:Git cleanup deletes unmanaged (untracked) files
 Landlord| Posted on 2025-4-8 08:45:14 |
gitlab

remote: The project you were looking for could not be found or you don't have permission to view it.

solution

Before modification:https://gitlab.com/gitlab_user/myrepo.git

After modification:https://<gitlabusername>@gitlab.com/gitlab_user/myrepo.git

Interpretation:

Enter your gitlabUsername in the .<gitlabusername>

Now, it will ask for your gitlab account password. Once the correct password is entered, the command will be executed successfully.

Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com