简体   繁体   English

GitHub GUI 没有列出 git 分支 -a 列出的所有分支

[英]GitHub GUI does not list all the branches that git branch -a does

Why do I only see a subset of the branches in the github GUI as compared to listing them from the terminal?为什么我只在 github GUI 中看到分支的子集,而不是从终端列出它们?

GUI:图形用户界面:

在此处输入图像描述

command line: git branch -a output is a list of local and remote branches, including more remote branches than those in GUI命令行: git branch -a output 是本地和远程分支的列表,包括比GUI中更多的远程分支

  experiments                  c52ef92 gp_sample_prior_functions
  load_profiles                a487d05 rename machine
* main                         d0c4531 update url path for img/
  models                       c09856c inverse transform the standardization and normalization of data
  temporal                     f9ad6d0 temporal aggregation and visualize kW / kWH
  remotes/origin/HEAD          -> origin/main
  remotes/origin/experiments   c52ef92 gp_sample_prior_functions
  remotes/origin/load_profiles a487d05 rename machine
  remotes/origin/main          d0c4531 update url path for img/
  remotes/origin/models        c09856c inverse transform the standardization and normalization of data
  remotes/origin/temporal      f9ad6d0 temporal aggregation and visualize kW / kWH

git branch -a lists two kinds of branch: local branches and remote tracking branches. git branch -a列出了两种分支:本地分支和远程跟踪分支。

Start by saying git fetch --prune on your machine.首先在你的机器上说git fetch --prune Now your remotes/origin branches match GitHub.现在你的remotes/origin分支匹配 GitHub。 So much for your remote tracking branches.您的远程跟踪分支就这么多。

And GitHub does not list your local branches, because they are local to you alone.并且 GitHub 没有列出您的本地分支机构,因为它们仅对您来说是本地的。 So there is nothing more to worry about.所以没有什么可担心的。

Those remote branches were probably deleted on github.那些远程分支可能在 github 上被删除了。

Your local git will not automatically "forget" about those (now deleted) remote-branches.您的本地 git不会自动“忘记”那些(现已删除)远程分支。
(In order to prevent possible unwanted data loss, I guess). (为了防止可能的不必要的数据丢失,我猜)。

If you want to remove locally stored remote branches that are no longer available on the remote server, use git fetch --prune如果要删除远程服务器上不再可用的本地存储的远程分支,请使用git fetch --prune

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 `git branch -a` 列出所有分支不显示最近获取的分支? - List all branches with `git branch -a` does not show recently fetched branch? git branch -a不显示所有远程分支 - git branch -a does not show all remote branches 为什么 git branch --merged 不显示所有合并的分支? - Why does git branch --merged not show all merged branches? git fetch是否在所有分支上运行,还是仅在当前分支上运行? - Does git fetch operate on ALL branches or just the current branch? 为什么`git branch -a`不显示`git branch -r`的分支? - why does `git branch -a` not show branches from `git branch -r`? Git:为什么“git 分支”没有列出所有分支? - Git: why doesn't "git branch" list all the branches? 特定分支上的git克隆存储库是否包含其他所有分支的信息? - Does a git cloned repository on a specific branch contain all the other branches' information? “git rm”命令的作用范围是什么,它对所有分支或HEAD分支都有影响 - What is the effect scope of “git rm” command, does it have effect on all branches or HEAD branch 如何获取从GIT分支创建的所有分支的列表(获取分支的所有子分支) - How to get list of all branches created off a GIT branch (get all sub branches of a branch) git fetch 获取有关所有远程分支的信息并且 git pull 执行 git fetch 然后只合并当前分支是否正确? - Is it correct that git fetch gets info about all remote branches and git pull does git fetch then only merges current branch?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM