search

Home  >  Q&A  >  body text

sourcetree - git commit code on one branch and commit to master at the same time?

Pull a branch test from master
Then submit the code in test, push
As a result, test master has submission records
Use sourcetree operation
Does anyone know what is going on? Thanks!

天蓬老师天蓬老师2824 days ago606

reply all(1)I'll reply

  • 巴扎黑

    巴扎黑2017-05-02 09:39:15

    It should be set by defaultremote.origin.push到两个分支testmaster

    I have never used sourcetree. I don’t know if she uses the one in the project.git/configor if she has any special configuration files.

    But you can check the .git/config file first to see if it contains the following content:

    [remote "origin"]
            push = master
            push = test

    If [remote "origin"]片段里有上述配置,那你每次git push, it will be submitted to both remote branches at the same time

    reply
    0
  • Cancelreply