Home > Article > Development Tools > How to modify GitLab address
When using GitLab for version control, sometimes you need to modify the address of the bound GitLab warehouse. Let’s introduce how to modify the GitLab address.
1. Modify the warehouse address
First, you need to log in to GitLab and enter the project page. On the project page, click the "Settings" button in the upper right corner.
In the project settings page, select the "Warehouse (Repository)" tab.
In the "Warehouse Address" column, update the original GitLab address to the new address and click "Save changes" ” button to save.
2. Modify the remote warehouse address
In Git, each project has some remote warehouses with an alias. The default remote warehouse alias is origin. What we need to modify is also origin. address.
Open the folder where the project is located, right-click and select "Git Bash Here" to enter the command line mode, enter the command:
$ git remote -v
You can view the remote warehouse address configured by the project. It should be noted that listed here are all remote warehouse addresses of this project.
Assuming that you need to modify the origin address, you can enter the following command:
$ git remote set-url origin [新的GitLab地址]
Replace it with the new GitLab address You have entered the original address and can confirm it again after the modification is completed.
$ git remote -v
The above is how to modify the GitLab address. Modifying the GitLab address allows us to manage the code more conveniently and continue development.
The above is the detailed content of How to modify GitLab address. For more information, please follow other related articles on the PHP Chinese website!