Commit versus Merge
Merges and Commits are a way of life when you use Abstract. They perform different tasks that will ultimately help you and your team efficiently collaborate. You design, re-design, delete, add, experiment, collaborate, and re-organize until the problem you’re trying to solve has an articulate solution.
Commits capture the iteration process for your designs. Start with an imported style guide or a fresh file and work through them as long as it makes your heart happy. After you save your work in Sketch, Abstract will prompt you to Preview & Commit. As you work, make a Commit to track your changes. Commit often so that you have a record of changes and iterations. When every pixel is perfect, you take those Commits and Merge the final, approved versions into Master.
Change your mind? Restore a Commit. Need more eyes for feedback? Annotate and comment on problems. After all is said and done, you’re ready to Merge to Master.
A Commit is a snapshot of the changes you’ve made to a file in a Branch. While you work in Sketch, you'll see the Abstract plugin at the bottom remind you to Preview & Commit. If you don't see that option, use File > Save or CMD+S in Sketch to trigger the prompt.
A Commit provides context to the changes in your work; it includes an overview of visual and non-visual changes and provides a space to document the changes for your team.
Saving in Sketch does not provide the same functions as a Commit.
If you save in Sketch instead of Committing your work, you are at high risk of data loss. File > Save or CMD+S in Sketch is not equal to Committing work in Abstract. We highly recommend you Commit at least once daily.
Commit every time you make a change to your Branch: a new exploration, when you finish a chunk of work, or when you change direction. Commit changes to all files you update or specific files you've updated by un-checking files with changes you wish to discard using the left-hand navigation.
To Commit changes:
- Click the Preview & Commit button from Abstract plugin at the bottom of Sketch.
- Abstract will open the Commit Changes window.
- Summarize your changes for your team.
- Click the Commit Changes button in the bottom right of the window.
If you happened to close Sketch without Committing first, Abstract will prompt you to Commit along the bottom of the Mac app. Using the ⌵ option to the right of Preview & Commit, select Discard Changes to trash your changes.
⚠️ Discard changes with caution: they aren't recoverable.
Afterward, you can review the Commit timeline on each Branch and in Master after they’ve been Merged. Click the Commits tab to review the Commit history on a Branch or in Master.
Now that you've Committed work, you're ready to Merge to Master.
Merge to Master when you're ready to update the finalized, approved versions of your work. Merge after you've created a Project, made a Branch, and Committed your work. Merging integrates the work you've done with the work that's already in Master.
Since any collaborator can Merge, check-in with the teammate who created the Branch first. This way, everyone is on the same page with the changes that are being Merged.
You can Merge Child Branches into their Parent Branch and you can Merge Parent Branches into Master.
- Select the Branch you’d like to Merge.
- Click the Merge button in the upper-right corner.
- Add notes to document the changes.
- Click Merge and Archive.
Merged Branches are automatically archived and you cannot unarchive them.
This typically happens when the metadata of a Sketch file is updated by another Sketch plugin.
The best option is simple: toggle other plugins on/off until you find the culprit.
To take a closer look:
- Go to Help > Toggle Developer Menu.
- Locate an artboard preview in Abstract that was unexpectedly shown as changed.
- Right-click to select Open Debugging Diff from the menu.
- A webpage with lots of code will open. Go to File > Save Page As in your browser to save and send it to support for deciphering.
Restore a Commit
Version control provides the ability to go back into history and see how a file used to look at any point in it's evolution.
If you want to "undo" a Commit or go back to an old exploration you can restore a Commit. You can restore Commits in Master or on Branches that you made.
Navigate to the Commit you wish to restore. In the top right you'll see an icon that looks like a clock
In the dialog that appears, confirm that you want to restore to this Commit. We'll keep the history of your Commits, even when you restore old Commits. You can undo a restored Commit, too.
A new Commit will be created on the Branch which includes all of the files to the state they were when it was originally Committed. You can now open these files or create a new Branch.