繁体   English   中英

Git-更改远程分支

[英]Git - Change remote branch

我有以下几点:

$ git remote show production
  Fetching repository, done.
  ...
  Local branches configured for 'git pull':
    master     merges with remote master
    production merges with remote production
  Local refs configured for 'git push':
    master     pushes to master     (up to date)
    production pushes to production (up to date)

但是我需要以下将本地分支机构的production推送到远程分支机构master 我该如何改变呢?

$ git remote show production
  Fetching repository, done.
  ...
  Local branches configured for 'git pull':
    production merges with remote master
  Local refs configured for 'git push':
    production pushes to master (up to date)

编辑

如果我尝试

git branch --set-upstream production production/master

我有这个奇怪的结果(“暂存”是我使用的另一个远程环境):

Branch production set up to track remote branch master from staging.

将本地生产分支机构的上游分支机构设置为原始主数据库。

git branch --set-upstream production origin/master

暂无
暂无

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

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