How to switch to a different remote branch in git

后端 未结 2 1091
感情败类
感情败类 2020-12-24 14:24

I have 3 local and 3 remote branches and want to be on the same branch on both.

on local:

git branch
  A
* B
  master

git branch -r         


        
2条回答
  •  失恋的感觉
    2020-12-24 14:54

    As far as I know, there's no way to change a remote's current branch with git push. Pushing will just copy your local changes up into that repository. Typically remotes you push to should be --bare, without a working directory (and thus no "current branch").

提交回复
热议问题