image.png

    1. git push
    2. warning: push.default is unset; its implicit value has changed in
    3. Git 2.0 from 'matching' to 'simple'. To squelch this message
    4. and maintain the traditional behavior, use:
    5. git config --global push.default matching
    6. To squelch this message and adopt the new behavior now, use:
    7. git config --global push.default simple
    8. When push.default is set to 'matching', git will push local branches
    9. to the remote branches that already exist with the same name.
    10. Since Git 2.0, Git defaults to the more conservative 'simple'
    11. behavior, which only pushes the current branch to the corresponding
    12. remote branch that 'git pull' uses to update the current branch.
    13. See 'git help config' and search for 'push.default' for further information.
    14. (the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
    15. 'current' instead of 'simple' if you sometimes use older versions of Git)
    16. Everything up-to-date

    下面说一下 push.default matching 和 push.default simple 的区别:
    matching:会把你本地所有的分支都push到远端
    simple:只会把你当前的分支push到远端

    push.default 设置 maching 的意思是:git push 会把你本地所有分支push到名称相对应的远程主机上。这意味着可能你会在不经意间 push 一些你原本没打算 push 的分支。
    push.default 设置成 simple 的意思是:git push 仅仅把当前所在分支push 到从当初 git pull 拉去下来的那个对应分支上,另外,这个过程也会同时检查各个分支的名称是否相对应。

    我用的是push.default matching命令:
    image.png

    执行完上面的命令后再git push就可以了
    image.png