什么是git主题分支? [英] What is a git topic branch?

查看:219
本文介绍了什么是git主题分支?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是git主题分支?它在某种程度上与普通分支不同吗?是否有任何分支不是主题分支?

What is a git topic branch? Does it differ from an ordinary branch in some way? Are there any branches that are not topic branches?

推荐答案

主题分支通常是您在本地创建的轻量级分支,这对你有意义。他们是您可能为错误修复或功能(他们也称为功能分支)工作的地方,预计需要一些时间才能完成。

Topic branches are typically lightweight branches that you create locally and that have a name that is meaningful for you. They are where you might do work for a bug fix or feature (they're also called feature branches) that is expected to take some time to complete.

另一种类型分支是远程分支或远程跟踪分支。这种类型的分支遵循别人的 else 工作的开发,并存储在您自己的存储库中。你定期更新这个分支(使用 git fetch )来跟踪别处发生的事情。当你准备好赶上其他人的变化时,你可以使用 git pull 来获取和合并。

Another type of branch is the "remote branch" or "remote-tracking branch". This type of branch follows the development of somebody else's work and is stored in your own repository. You periodically update this branch (using git fetch) to track what is happening elsewhere. When you are ready to catch up with everybody else's changes, you would use git pull to both fetch and merge.

我还看到另一种分支,它基本上是同一个存储库中完全独立的文件树。例如, Git存储库本身包含名为 man html ,其中包含完全不同于 master 分支。我不知道这些分支通常称为什么。

I have also seen another kind of branch which is essentially a completely separate tree of files in the same repository. For example, the Git repository itself contains heads named man and html that contain entirely different content from the master branch. I don't know what these types of branches are usually called.

这篇关于什么是git主题分支?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆