1.更新远程分支
比如远程上新建分支了,本地idea上还没有这个分支,使用命令:git remote update origin
origin的意思是:https://www.zhihu.com/question/27712995
2.查看当前远程仓库链接标记和链接本身:
# 查看远程仓库链接标记名(或叫远程仓库链接别名)
git remote
# 查看远程仓库链接标记名及链接本身(v是verbose,在这里是多输出点信息让你看的意思)
git remote -v
输出:
> git remote origin > git remote -v origin https://github.com/xiebruce/test.git (fetch) origin https://github.com/xiebruce/test.git (push)
3.git clone命令
$ git clone https://github.com/tianqixin/runoob-git-test another-runoob-name 拷贝远程 git 项目,本地项目名为 another-runoob-name
$ git clone -b master2 ../server . 表示克隆名为master2的这个分支,如果省略-b <name>表示克隆master分支。
在默认情况下,Git会把"Git URL"里最后一级目录名的'.git'的后辍去掉,做为新克隆(clone)项目的目录名: (例如. git clone http://git.kernel.org/linux/kernel/git/torvalds/linux-2.6.git 会建立一个目录叫'linux-2.6')
---