[译]git remote
git remote命令让我们可以创建, 查看, 删除一个到其他仓储的连结.
下图展示了我们的本地仓储有两个remote连接, 一个是中央仓储, 一个是其他开发者的仓储. 除了使用完整的url指向他们, 还可以通过别名来执行他们. 一般情况下origin就是我们的中心仓储的别名.

用法
git remote
列出来你的仓储有哪些远程连接.
git remote -v
和上面的命令类似, 但是他列出了每个连接的url地址.
git remote add <name> <url>
创建一个连接到远程仓储的连接. 添加后你可以使用<name>做为<url>的一个别名.
git remote rm <name>
删除一个远程连接
git remote rename <old-name> <new-name>
修改远程连接的别名.
讨论
当你使用git clone一个仓储的时候, 会自动创建一个别名为origin的远程连接到你clone的仓储.
例子
如果你的同事John有一个公共的仓储dev.example.com/john.git, 你可以用如下的方法添加一个连接到John:
git remote add john http://dev.example.com/john.git
[译]git remote的更多相关文章
- 修改git remote url
$ ssh -v wangz@gitlab.alibaxx-inc.com $ git remote ali set-url git@gitlab.alibaxx-inc.com:youk-aaa/x ...
- Git remote 修改源
Git remote 修改源 git commit -m "Change repo." # 先把所有为保存的修改打包为一个commit git remote remove orig ...
- 聊下 git remote prune origin
在你经常使用的命令当中有一个git branch –a 用来查看所有的分支,包括本地和远程的.但是时间长了你会发现有些分支在远程其实早就被删除了,但是在你本地依然可以看见这些被删除的分支. 你可以通过 ...
- git remote 相关用法
为了便于管理,Git要求每个远程主机都必须指定一个主机名.git remote 命令就用于管理主机名. 不带选项的时候,git remote命令列出所有远程主机. $ git remote orig ...
- git remote log error
使用git pull的时候收到以下信息: error: there are still refs under 'refs/remotes/origin/xxxx'From 10.1.25.57:yyy ...
- How to get started with GIT and work with GIT Remote Repo
https://www.ntu.edu.sg/home/ehchua/programming/howto/Git_HowTo.html#zz-7. 1. Introduction GIT is a ...
- git remote
在git里,服务器上的仓库在本地称之为remote. 直接clone一个仓库: $: git clone git@search.ued.taobao.net:projects/search.git 另 ...
- git命令之git remote的用法
git remote git remote -v git init git add xxx git commit -m 'xxx' git remote add origin ssh://softw ...
- 使用tortoisegit工具git地址中带号码密码的拉取,以及使用这种方式后中途重置密码报git remote: HTTP Basic: Access denied 错误解决办法
1. 在拉取git项目时可以在地址中直接指定号码密码如下就可以直接拉取下来 https://username:password@github.com 需要注意,因为在解析地址时是以@符号作为地址信 ...
随机推荐
- struts2 CVE-2012-0392 S2-008 Strict DMI does not work correctly allows remote command execution and arbitrary file overwrite
catalog . Description . Effected Scope . Exploit Analysis . Principle Of Vulnerability . Patch Fix 1 ...
- 分析ffmpeg解析ts流信息的源码
花费一些时间,然后全部扔了.为了不忘记和抛砖引玉,特发此贴. ffmpeg解析ts流 1.目的 打算软件方式解析出pat,pmt等码流信息 2.源代码所在位置 下载ffmpeg ...
- dataGrid查询表格
waf("#Gird").dataGrid("reloadGrid") //重新发请求去装载数据 waf("#Grid").wafGrid( ...
- ARPSpoofing教程(三) - 捕获数据包
1: #include"pcap.h" 2: //每次捕获到数据包时,libpcap都会自动调用这个回调函数 3: void packet_handler(u_char *para ...
- HTML5学习总结-11 IOS 控件WebView显示网页
一 加载外部网页 1.使用UIWebView加载网页 运行XCode 新建一个Single View Application . 2 添加安全消息 添加以下消息到项目的 Info.plist &l ...
- IOS基础之 (设计模式)
一 工厂方法 工厂方法方便我们快速创建类的实例的方法.通过工厂方法,可以让调用过程更加清晰. Person.h #import <Foundation/Foundation.h> @int ...
- JZOJ P1817:[8.27]研究性学习作业
传送门 老师良心推荐的二分题.7月29号第一次写,想到了裸的DP,乱搞搞过了6组,欲优化,无解,弃疗. 然后今天老师给了题解,简单看了一下. 正解是二分答案+DP验证. 二分天数$day$,然后对于每 ...
- python 培训之 Python 数据类型
0. 变量 计算机某块内存的标签,存储数据的容器的标签,可被覆盖. a = "" a = "a1bcd" a=a+"ddd&quo ...
- myeclipse 破解步骤
Fllow Orders.0. Close MyEclipse Application(if you wanna replace jar file).1. Fill usercode2. Fill s ...
- WinForm------分页控件dll下载地址
转载: http://files.cnblogs.com/wuhuacong/TestPager_SqlLite.rar