Git: which is the default configured remote for branch?

前端 未结 4 755
半阙折子戏
半阙折子戏 2020-12-02 04:02

I have a remote bare repository hub. I work only in the master branch. The last sentence of this error message below makes me wonder: How do I find

4条回答
  •  感情败类
    2020-12-02 04:30

    For the sake of completeness: the previous answers tell how to set the upstream branch, but not how to see it.

    There are a few ways to do this:

    git branch -vv shows that info for all branches. (formatted in blue in most terminals)

    cat .git/config shows this also.

    For reference:

    • how do I get git to show me which branches are tracking what?
    • What is this branch tracking (if anything) in git?

提交回复
热议问题