Ver dirección repositorio Git remoto

/usr/local/Homebrew> git:(stable) git remote -v
origin	https://github.com/Homebrew/brew (fetch)
origin	https://github.com/Homebrew/brew (push)
  • los comandos relacionados con Remot git
➜  /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
  • Modificar la dirección remota directamente desde el comando
进入git项目仓库根目录
git remote 查看所有远程仓库, git remote xxx 查看指定远程仓库地址
git remote set-url origin http://192.168.100.235:9797/john/git_test.git
  • Agregar el comando para eliminar el repositorio remoto
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
Publicados 175 artículos originales · ganado elogios 76 · Vistas de 230.000 +

Supongo que te gusta

Origin blog.csdn.net/qq_29232943/article/details/104637674
Recomendado
Clasificación