View remote git repository address

/usr/local/Homebrew> git:(stable) git remote -v
origin	https://github.com/Homebrew/brew (fetch)
origin	https://github.com/Homebrew/brew (push)
  • git remot related commands
➜  /usr/local/Homebrew> git:(stable) git remote
add               -- add a new remote
get-url           -- retrieves the URLs for a remote
prune             -- delete all stale tracking branches for a remote
remove        rm  -- remove a remote and all associated tracking branches
rename            -- rename a remote and update all associated tracking branches
set-branches      -- change list of branches tracked by a remote
set-head          -- set or delete default branch for a remote
set-url           -- change URL for a remote
show              -- show information about a given remote
update            -- fetch updates for a set of remotes
  • Modify the remote address directly from the command
进入git项目仓库根目录
git remote 查看所有远程仓库, git remote xxx 查看指定远程仓库地址
git remote set-url origin http://192.168.100.235:9797/john/git_test.git
  • Add the command to delete the remote repository
1.进入git项目仓库根目录
2.git remote 查看所有远程仓库, git remote xxx 查看指定远程仓库地址
3.git remote rm origin
4.git remote add origin http://192.168.100.235:9797/john/git_test.git
Published 175 original articles · won praise 76 · Views 230,000 +

Guess you like

Origin blog.csdn.net/qq_29232943/article/details/104637674