I have a 2gp, namespaced package working great. My question is, if I want to experiment in a fork of my git repository, wipe out my sfdx-project.json file in the fork, link it to a NEW dev_hub in the fork with the same namespace would there be any ancestry issues between the two packages (main and forked)? Both would have independent dev_hubs with the same namespace and different sfdx-project.json files. I do NOT want to preserve ancestry in my experimental fork and I don't want it to pollute the main repositories ancestry. If anything comes of the experimental fork I will migrate the code to the main repository. I do want the same namespace in my fork though. I assume this should work, but wanted some independent verification.


1 Answer 1


Yes, this will work (provided you link your namespace to both Dev Hubs), and you won't have any ancestry issues.

But you also don't need to do this at all. You can just change the name of your package in the experimental fork if you want to have an independent package with the same namespace. Your Dev Hub can own both just fine, and they won't have any relationship to one another.

It's also fine to build a line of 2GPs on a branch in your original repo, without ancestry, that you later choose to throw away. That's one of the great merits of 2GP - you get freedom to iterate and experiment without risk to your production codebase.

  • David, you found me in the wild outside of Power of Us! So to do this in CumulusCI terms if I run the task create_package_version I create a beta package I can use with my experiments and abandon without github artifacts. When I get around to running the full flow for something (release_2gp_beta) things will still be fine and my other beta package will be abandon?
    – Thad
    Oct 13, 2021 at 17:07
  • 1
    The flow build_feature_test_package is actually even easier (and much faster) if you just want a mock package to throw away.
    – David Reed
    Oct 13, 2021 at 18:51

You must log in to answer this question.

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