Git 修改远程地址

以项目 https://github.com/mazeyqian/mazey 为例,查看远程地址:

# check
git remote -v;

origin  https://github.com/mazeyqian/mazey.git (fetch)
origin  https://github.com/mazeyqian/mazey.git (push)

修改远程地址:

# set HTTPS to SSH
git remote set-url origin git@github.com:mazeyqian/mazey.git

# check
git remote -v;

origin  git@github.com:mazeyqian/mazey.git (fetch)
origin  git@github.com:mazeyqian/mazey.git (push)

发表评论

您的电子邮箱地址不会被公开。