How can I create a remote branch based on another already existing remote without checking out to creating local and pushing to the remote.
To elaborate a little, at repo1
I am at branchA
. There exist an origin/branchB
and I want to create a origin/branchC
in the same place as B. A is different from both. I know B
is a duplicate to C
in repo1
but at another repo2
eg, it will be different.
(I know the question sounds weird but in my large company environment the production build needs to have a single branch name, but checking all repos is impossible due to space limitations. )
这是创建远程branchC
一种方法,该方法从与origin/branchB
相同的提交开始:
git push origin origin/branchB:branchC
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.