查看
$ git remote -v = --verbose(冗长的) 记忆方法:also显示冗长版本的地址,即完整url,而非alias origin (fetch) origin (push) 注:可以有多个远程仓库。
add
git remote add [-t ] [-m ] [-f] [--[no-]tags] [--mirror=] $ git remote add pb
修改简写的对应URL
方式一: git remote set-url origin ?【new_remote_repository_address】
方式二:先删除后新建 project_name> git remote remove origin project_name> git remote add origin【new_remote_repository_address】 #添加一个远程仓库地址
修改URL对应的简写
*git remote show 看到更多的信息。
$ git remote show origin
- remote origin
URL: Fetch URL: Push URL: HEAD branch: master Remote branches: master tracked dev-branch tracked markdown-strip tracked issue-43 new (next fetch will store in remotes/origin) issue-45 new (next fetch will store in remotes/origin) refs/remotes/origin/issue-11 stale (use 'git remote prune' to remove) Local branches configured for 'git pull': dev-branch merges with remote dev-branch master merges with remote master Local refs configured for 'git push': dev-branch pushes to dev-branch (up to date) markdown-strip pushes to markdown-strip (up to date) master pushes to master (up to date)
列出了哪些远程分支不在你的本地,哪些远程分支已经从服务器上移除了,还有当你执行 git pull 时哪些分支会自动合并。 (编辑:李大同)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|