How to handle the change to “Salesforce DX project format” and keep the revision history?

Downloaded and took a brief look at the IDE 2 (Beta) this morning that layers on top of the Salesforce CLI (Beta).

As someone with many existing projects containing files that have been through many version control revisions (that I need to keep), I’m wondering how to handle the change to the layout of the files now that (it appears) the src folder is gone as are the component type folders. I did see Convert the Metadata API Source.

Any thoughts or strategies (on how to keep the revision history) appreciated.


The change from Eclipse tooling to IntelliJ (Android Studio) tooling required similar changes for Android projects. This Migrating Git repo from Eclipse to Android Studio suggests the sort of process needed.


I think I’m looking for an sfdx plugin that instead of doing a convert:

sfdx force:mdapi:convert --rootdir <retrieve dir name>

runs a series of git mv commands.


If the changes are not to complicated Git is able to recognized files moves without explicitly calling git mv as described here

I tested this myself using our internally used packaged travel expense app.
A few month ago I was taking part in the DX Pilot and used

sfdx force:mdapi:convert --rootdir <retrieve dir name>

to convert the structure. Here is the commit which shows that all moves where recognized. I later reverted the structure back and the history of files is still there, across all the changes.

enter image description here

Source : Link , Question Author : Keith C , Answer Author : Robert Sösemann

Leave a Comment