search

Home  >  Q&A  >  body text

What command is used to check the default remote branch name of git push?

For example:
git push -u origin master
This command sets origin/master as the default branch to be pushed. Just git push directly from now on.
But I forgot about it after a while. I want to check it out. What is the order?

For example:
git push -u origin test
git push
//The remote branch I pushed at this time should be origin/test

Then my question is, after a while I forgot whether git push will push to origin/master or origin/test
Is there any command to check?

git remote -v can only view the remote URL corresponding to origin.
Am I understanding it wrong?

習慣沉默習慣沉默2813 days ago620

reply all(5)I'll reply

  • 我想大声告诉你

    我想大声告诉你2017-05-02 09:30:47

    git branch -vv

    reply
    0
  • phpcn_u1582

    phpcn_u15822017-05-02 09:30:47

    git remote -v

    reply
    0
  • 習慣沉默

    習慣沉默2017-05-02 09:30:47

    These settings are saved in the local config, use the following command to view:
    git config --local -l
    Related entries:
    push.default
    branch.<name>.merge
    branch.<name>.remote
    Introduction to the entry: git help config

    reply
    0
  • ringa_lee

    ringa_lee2017-05-02 09:30:47

    -u settings default

    reply
    0
  • 怪我咯

    怪我咯2017-05-02 09:30:47

    git remote -v

    reply
    0
  • Cancelreply