Search code examples
gitphabricator

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


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

They both seem to create a new branch.


Solution

  • 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.