Given the following scenario:
git checkout master git checkout -b branch1 .. do work wip arc diff git checkout -b branch2 ... do some more work wip arc diff <hash of branch1>
Running arc land on branch2 gives this message:
Landing current branch 'branch2'. TARGET Landing onto "master", the default target under git. REMOTE Using remote "origin", the default remote under git. You have untracked files in this working copy. Working copy: /home/fred/projects/go/src/xxxx/ Untracked changes in working copy: (To ignore these changes, add them to ".git/info/exclude".) Makefile errors.log Ignore these untracked files and continue? [y/N] y FETCH Fetching origin/master... These commits will be landed: - 9bcc5b6 branch1 description - 21cc078 branch2 description Usage Exception: There are multiple revisions on feature branch 'branch2' which are not present on 'master': - D2094: branch1 description - D2095: branch2 description Separate these revisions onto different branches, or use --revision <id> to use the commit message from <id> and land them all.
Should I do arc land --revision 2095 to land them both?
git checkout branch1 arc land git checkout branch2 arc land
I eventually figured out that the following pattern works. Not sure if this is the best approach, but this is what I've been doing lately.
Create a stack
> git checkout -b feature1 > git commit -am "WIP" > arc diff > git checkout -b feature2 > git commit -am "WIP" > arc diff > git checkout -b feature3 > git commit -am "WIP" > arc diff
Land the stack
> git checkout feature1 > arc land > git checkout feature2 > git rebase master > arc land > git checkout feature3 > git rebase master > arc land