How do I push a new local branch to a remote Git repository and track it too?

后端 未结 15 1605
逝去的感伤
逝去的感伤 2020-11-22 09:17

I want to be able to do the following:

  1. Create a local branch based on some other (remote or local) branch (via git branch or git checkout

15条回答
  •  甜味超标
    2020-11-22 10:00

    1. Create a branch on the remote.
    2. After creating, following command will sync your local repo with remote
      git pull origin master
    3. checkout to new branch
    4. Update your code and commit.
    5. just do git push

提交回复
热议问题