Page MenuHomePhabricator

Arcanist Workflows
Updated 4,367 Days AgoPublic

Version 1 of 3: You are viewing an older version of this document, as it appeared on May 8 2012, 8:12 PM.

Descriptions of Arcanist workflows.

Official epriestley Workflow

This is how I use arc with Git.

I use an amend/rebase mutable-history workflow where each idea is always represented by one commit. I never make checkpoint commits, and I never write Git commit messages, and I never merge. I have two shell aliases:

  • wip: ("work in progress") git commit -a -m WIP
  • squish: git status && git commit -a --amend -C HEAD

I use TextMate to edit code. The mate commands below invoke the editor, although I usually locate and open files with GUI in the Finder.

To start a new change, I work in feature branches.

$ git checkout master
$ git checkout -b newfeature
$ mate somefile.php
$ wip
$ arc diff

To update a change, I amend it into HEAD.

$ mate somefile.php
$ squish
$ arc diff

To start a new feature which depends on another feature, I branch off the branch. I do this rarely.

$ git checkout newfeature
$ git checkout -b newerfeature
$ mate newfile.php
$ wip
$ arc diff

To pull in other users' changes to a first-degree branch, I rebase. I do this very rarely.

$ git rebase master

To rebase an nth-degree branch, I cherry-pick. This is usually painless, while using rebase often isn't.

$ git checkout newerfeature
$ git show # copy commit hash
$ git reset --hard newfeature
$ git cherry-pick <hash>

To push a change, I use arc land:

$ arc land newfeature
Tags
None
Referenced Files
None
Tokens
"Pterodactyl" token, awarded by chad."Baby Tequila" token, awarded by cburroughs."Like" token, awarded by robertkraig."Like" token, awarded by markjen."Like" token, awarded by whitneyas."Like" token, awarded by svemir."Like" token, awarded by rockybean.
Last Author
epriestley
Last Edited
May 8 2012, 8:12 PM