How to prevent phabricator from eating my commit history
asherkin's answer explains the rationale for this behavior, and why this is the default.
If you don't find that argument compelling, you can use the --merge
flag to arc land
to perform --no-ff
merges instead of --squash
merges. These merges will not destroy local commits.
If you set history.immutable
to true in your .arcconfig
, arc land
will --no-ff
merge by default.
You can also use raw git
commands if you don't like the behavior of arc land
; it is provided only for convenience.
In your example, we recommend creating five separate reviews -- there are multiple different ideas being implemented, and they are not related and seem easily separable. See Writing Reviewable Code. Combining bugfixes, style changes and new features into one change is hoarding.
You should use the native git flow such as git merge
and git push
directly instead. From phabricator arc documentation:
After changes have been accepted, you generally push them and close the revision. arc has several workflows which help with this, by:
* squashing or merging changes from a feature branch into a master branch * formatting a good commit message with all the information from Differential * and automatically closing the revision.
You don't need to use any of these workflows: you can just run git push, hg push or svn commit and then manually close the revision from the web.
arc
is squashing your commits on purpose.