Sometimes you may find that you have a Sketch file outside Abstract that has newer edits than the corresponding file inside Abstract. There is an easy way to handle this by using Abstract's replace file feature.
Replace a file
To completely replace a file in Abstract with one from your filesystem, do the following:
- Navigate to the Files tab in the branch you are working on
- Right click on the file you wish to replace
- Choose Replace...
- Pick the file from your computer
- A new commit will be created that shows the changes that were made
That's it! The file will now match the contents of the file from your file system.
Restoring a file from a different branch (or commit)
You can also use the replace file feature to restore a file from a different branch (or even a particular commit). To do that, you can use the export file feature to first export the version you want from Abstract and then use replace file to use that file's contents in a different branch.
To export a file:
- Navigate to the branch that has the version of the file you want
- Navigate to the Files tab
- Right click on the file you want to export
- Choose Export...
- Pick where you want to export the file
- Use the replace file steps described above to replace the contents from the exported file
To export a file from a commit, you can right click on the file header in the commit detail and choose Export... to export the file as it was in that commit.