Home  >  Article  >  Development Tools  >  How to modify GitLab address

How to modify GitLab address

PHPz
PHPzOriginal
2023-03-31 17:49:084222browse

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

  1. Open the project page

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.

  1. Enter the warehouse settings page

In the project settings page, select the "Warehouse (Repository)" tab.

  1. Modify warehouse address

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.

  1. View the remote warehouse 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.

  1. Modify the remote warehouse address

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn