Remote branch is not showing up in “git branch -r”

前端 未结 5 1254
野性不改
野性不改 2020-12-07 11:17

I have been pushing to a remote Bitbucket repository and recently a colleague has pushed a new branch he created to the same repository.

I\'m trying to fetch the cha

5条回答
  •  死守一世寂寞
    2020-12-07 12:09

    If you clone with the --depth parameter, it sets .git/config not to fetch all branches, but only master.

    You can simply omit the parameter or update the configuration file from

    fetch = +refs/heads/master:refs/remotes/origin/master
    

    to

    fetch = +refs/heads/*:refs/remotes/origin/*
    

提交回复
热议问题