1

I am thinking it is time to try start moving the largest org I work on from meta-data format to source. This is not something I want to do all at once. I planned to start with a small package and move from there.

My question is how would you keep your old src folder and the force-app folder on Github? I don't know if this is recommended or if I should just start a new repo for SFDX? Right now I seem to be making a total hash of things by trying to keep both formats in the same repo.

I was trying to create an SFDX project and clone the Github repo with the metadata format into that. But I am just making a mess and creating unrelated merge histories.

I am curious what the best practice is here.

I was reading a post by SFDCFox git repo design pattern for sfdx projects

Should I just create a repo for each project in DX rather than a happy soup repo with a mix of source and meta-data?

1 Answer 1

3

As I've probably told someone somewhere before, you can use git mv <filename> to migrate the bits and pieces in to the respective packages as you unsoupify (is that a word?) your metadata. For a while, this means having a force-app and src folder while you migrate, but you do need to get started. I'm reminded of the quote:

"The journey of 1,000 miles starts with a single step." --Laozi

This retains (most of) your history and will make it easy to track historical changes. Ultimately, the choice is up to you, but keep in mind that creating new repos means you lose historical data. It's your choice if you want to lose this history or not. This is the path that our organization is taking (migrating as we develop, plus unlocked packages).

2
  • Would the workflow be something like 1. Create Project, 2. Git Clone, 3. Retrieve Metadata, 4. Convert Metadata, 5. Git Commit and Add? Commented Jun 24, 2019 at 20:17
  • 2
    @BrooksJohnson Git clone, create project, commit changes, convert pieces of metadata via git mv <filename-or-path>, commit changes. You don't need to lose your history if you've already got it.
    – sfdcfox
    Commented Jun 24, 2019 at 20:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .