How to Restore Information from Git
In this article, you will find the steps to restore components from Git that have been deleted in a Salesforce org:
1. Find the correct version on the org branch in Git (commit Id/Commit Message). If necessary, modify the content in Git outside Copado to create the desired version.
2. Go to the org snapshot or org backup snapshot and click on Retrieve Commits (on the backup snapshot this might not be required):
This step is only required if something has been done in Git outside Copado in order to bring a reference to the commits into Copado, which is done through this feature.
Backup snapshots are executed through Copado, therefore the records will be seen as a related list on the Git Snapshot record.
In the working repository, Copado does not auto-create Snapshot Commit records for orgs to which you usually only promote.
Note: Please note that retrieved commits (snapshot commits) contain a unique commit Id. When the retrieve is performed, the snapshot commits that already exist in Copado in the same branch and with the same commit Id are mass updated with the new org credential and Git snapshot.
3. Create a new Advanced multi-step deployment.
4. Select as source and destination orgs the environment where you need to restore the information.
5. Add a new step.
7. Select the commit Id that has the content you want to restore (this is the reason for the first step). In the selection modal you can filter by repository and branch if required:
8. In the grid, select what you need to deploy. The grid will mark the files that were modified in the commit, but you can select all available metadata in the repository at a specific commit.
9. Save the step and execute the deployment.