Home  >  Q&A  >  body text

Code cloud + git branch problem

1. I maintained my code using Code Cloud git, created a project on Code Cloud and added a branch called jts. Then clone it locally, create a branch called JTSDEV locally and submit the changes. When I use different command lines, different branches will be displayed. The branches I created on the code cloud cannot be displayed on the command line, but the branches I created using the command line are not on the code cloud. Why is this?

phpcn_u1582phpcn_u15822663 days ago855

reply all(3)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-06-05 11:11:07

    I don’t quite understand. Are you saying that JSTDEV is not associated with remote jst?
    If so, it’s because you haven’t associated them
    It means you build a branch locally and a branch remotely. Of course they are not related.
    You have to manually associate them. If not, delete one of them and synchronize it.
    Take a look at this tutorial http://www.liaoxuefeng.com/wi...

    reply
    0
  • 大家讲道理

    大家讲道理2017-06-05 11:11:07

    You switch to the local JTSDEV and then git pull, it will prompt you set-upstream or something like that, which means to bind your local text to the remote one, watch the command line prompt carefully

     git branch --set-upstream-to=origin/jts JTSDEV
    

    reply
    0
  • 仅有的幸福

    仅有的幸福2017-06-05 11:11:07

    The git clone is the master branch

    You need to checkout jst, git will automatically find the remote jst and then create a local one and associate it

    Then you can maintain the local and remote code by modifying the files under the local jst branch and then commit push

    It is also recommended to read through the git tutorial:
    http://www.liaoxuefeng.com/wi...

    reply
    0
  • Cancelreply