Git - Browse remote repository

后端 未结 3 1739
鱼传尺愫
鱼传尺愫 2021-01-18 21:41

I have a small problem at work.

We commit all the different projects to different remote repositories and sometimes people get confused by the names they create at 4

3条回答
  •  天命终不由人
    2021-01-18 22:29

    To list only remote branches, first fetch (to ensure you have a local reference to them all), then list them:

    git fetch
    git branch -r
    

    You may wish to, after fetching, do a git remote prune (where is the name of your remote—usually origin) to remove obsolete local references to remote branches that have been deleted.

    The only way to directly “browse” a remote repository is to log into the server it resides on and do so (or setup gitweb or similar). Git is centered around the idea that your local copy has everything the remote does.

提交回复
热议问题