简体   繁体   English

git中&#39;:&#39;的用法是什么 <branch_name> : <branch_name>

[英]what is use of ':' in git <branch_name>:<branch_name>

I have seen many git commands with syntax like:- <branch_name>:<branch_name> like git push origin (<branch_name>:<branch_name>) . 我已经看到许多git命令,其语法如下:- <branch_name>:<branch_name>git push origin (<branch_name>:<branch_name>) What exactly is the meaning of : here (why 2 times branch name)? :这里的确切含义(为什么是分支名称的2倍)? Also, I want to know the difference between git push origin <branch_name> and git push origin <branch_name>:<branch_name> 另外,我想知道git push origin <branch_name>git push origin <branch_name>:<branch_name>

With colon notation, a soure and a destination can be defined ( <source>:<destination> ), to 使用冒号表示法,可以定义<source>:<destination>和目的地( <source>:<destination> ),以

Specify what destination ref to update with what source object. 指定要使用哪个源对象更新的目标引用。

See the git push documentation about refspecs and the answers to this question 请参阅有关refspecgit push文档以及此问题的答案

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM