更换远程仓库IP地址

基本命令 git remote set-url 辅助命令git romote -v

示例如下

git remote -v
# View existing remotes
# origin  https://192.168.1.1:21/user/repo.git (fetch)
# origin  https://192.168.1.1:21/user/repo.git (push)

git remote set-url origin https://192.168.1.112:2555/user/repo2.git
# Change the 'origin' remote's URL

git remote -v
# Verify new remote URL
# origin  https://192.168.1.112:2555/user/repo2.git (fetch)
# origin  https://192.168.1.112:2155/user/repo2.git (push)

猜你喜欢

转载自blog.csdn.net/huapenguag/article/details/104575868