首页 > git > arc feature [branch-name]和git branch [branch-name]之间有什么区别?

arc feature [branch-name]和git branch [branch-name]之间有什么区别? (What are the differences between arc feature [branch-name] and git branch [branch-name]?)

2015-08-21 gitphabricator

问题

arc feature [branch-name]和之间有什么区别git branch [branch-name]

他们似乎都创建了一个新的分支。

解决方法

arc feature [branch-name] 将:

  • 根据您当前签出的提交创建分支,
  • 将跟踪设置为您已检出的分支(这将跟踪本地分支,而不是远程分支),
  • 看看那个分支。

git branch [branch-name] 只会根据您当前签出的提交创建一个分支。

如果您使用的是奥术师的工作流程,强烈建议使用arc feature您的分支,因为这往往会借本身很好地的后续命令arc diffarc land

问题

What are the differences between arc feature [branch-name] and git branch [branch-name]?

They both seem to create a new branch.

解决方法

arc feature [branch-name] will:

  • Create a branch based from the commit you currently have checked out,
  • Set the tracking to the branch you have checked out (this will be to track the local branch, not the branch on your remote),
  • Check out that branch.

git branch [branch-name] will only create a branch based from the commit you currently have checked out.

If you are using the Arcanist workflow, it is strongly recommended to use arc feature for your branches as this tends to lend itself well to the followup commands of arc diff and arc land.

相似信息