gitphabricator

Exclude commits from Phabricator revision


I accidentally included the last five commits in a Phabricator revision, where as I should have only included the last one.

When I try arc diff --update D100, I see a vim page with a bunch of commented out info about my revision and nothing to edit:

# Updating D100: REVISION TITLE
#
# Enter a brief description of the changes included in this update.
# The first line is used as subject, next lines as comment.
#
# If you intended to create a new revision, use:
#  $ arc diff --create

Also the commits have been squashed together. How can I exclude the four undesired ones?


Solution

  • Ok so, since the unwanted commits had been squashed together with only the last one I intended to include in the revision, I first needed to cherry-pick.

    git cherry-pick COMMIT_HASH
    

    Then I updated the revision using arc diff --update D100 HEAD^