You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/refguide/version-control/using-version-control-in-studio-pro/_index.md
+29-13Lines changed: 29 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -201,14 +201,42 @@ Select a revision to see additional details, such as related stories, changed do
201
201
202
202
## Reverting Changes {#revert-changes}
203
203
204
+
In case you want to undo changes that have been made, it is important to understand the difference between uncommitted changes, and committed changes that have been pushed to the server. Uncommitted work can simply be reverted, while committed work requires a new **Reverse commit** to undo.
205
+
206
+
### Revert Uncommitted Changes
207
+
204
208
Changes that have not yet been committed can be reverted. Say, for example, that you have made a lot of changes to a page and you are not happy with the result. You can revert the page to the original state, that is, the state of the page before you started making changes.
205
209
206
-
Deletes of documents, folders, and modules can also be reverted. This brings them back into the app. Note that you will get back the latest version you have committed. For example, if you commit, make some changes to a microflow, and then delete the microflow, reverting the delete gives you the microflow without the changes that you made.
210
+
Deletes of documents, folders, and modules can also be reverted. This brings them back into the app. Note that you will get back the latest version you have committed. For example, if you commit, make some changes to a microflow, and then delete the microflow, reverting the delete restores the microflow without the changes that you made.
207
211
208
212
You can revert changes in the **Changes** pane, from **Version Control** > **Revert All Changes**, or from the right-click menu on the document you want to revert.
209
213
210
214
{{< figure src="/attachments/refguide/version-control/using-version-control-in-studio-pro/revertx2.png" alt="Two ways of reverting" class="no-border" >}}
211
215
216
+
{{% alert color="info" %}}
217
+
You can also **Revert All Changes** while [merging](#merge). This will restore your app to the most recent, discarding changes creating by the merging process.
218
+
{{% /alert %}}
219
+
220
+
### Revert a Previous Commit
221
+
222
+
Changes that have been committed and pushed to the server can never be deleted from the history. However, you can make another commit to revert the changes. This feature is called **Reverse commit** in Studio Pro.
223
+
224
+
Choose the **Version Control** menu > **Revert a Commit...** to revert a commit. This will create the original changes 'in reverse', which you can commit and push to the server.
225
+
226
+
{{% alert color="warning" %}}
227
+
Reverting a commit creates a new set of changes to cancel out the changes from the commit. If you used Port Fix to put a commit from another branch on the current branch, and you revert that commit, the changes will not be applied again when eventually merging the entire branch.
228
+
{{% /alert %}}
229
+
230
+
Reverting changes is done with one commit at a time. If you want to revert multiple commits, you can do that by reverting the latest commit, then the previous one, only one by one.
You can also choose to revert a commit in which another branch was merged into the current branch. If you revert the merge, the app will look like the changes never happened: if you reverse merge adding a new page, the page will be deleted locally.
237
+
238
+
Just like when you are doing a normal merge, conflicts can arise. For example, if later commits change the new page, the reverse merge will result in a conflict. After resolving the conflict, you can commit and push the results to the remote repository.
239
+
212
240
## Dealing With Conflicts {#conflicts}
213
241
214
242
If you update/pull your app and the changes cannot be merged automatically, you will receive a message telling you that there are conflicts. A conflict arises when two changes cannot be combined.
@@ -276,18 +304,6 @@ Merging is always done while you have a working copy open. The merge will result
276
304
277
305
Select **Version Control** > **Merge Changes Here**, after that you can select **Port fix** or **Merge feature branch** options. For more information on merge settings, see [Merge Dialog](/refguide/merge-dialog/).
278
306
279
-
#### Reverting a Commit
280
-
281
-
[Reverting changes](#revert-changes) works for changes that have not been committed yet. Changes that have been committed and pushed to the server can never be deleted from the history. However, you can make another commit to revert the changes. This feature is called **Reverse commit** in Studio Pro.
282
-
283
-
Choose the **Version Control** menu > **Revert a Commit...** to revert a commit.
284
-
285
-
Reverting changes is done with one commit at a time. If you want to revert multiple commits, you can do that by reverting the latest commit, then the previous one, only one by one.
After a reverse merge the app will look like the changes never happened; if you reverse merge adding a new page, the page will be deleted locally. Just like when you are doing a normal merge, conflicts can arise. For example, if later commits change the new page, the reverse merge will result in a conflict. After resolving the conflict, you can commit and push the results to the remote repository.
290
-
291
307
#### Replacing the Main Line with a Branch Line
292
308
293
309
There are two methods for fully replacing your main line with a branch line.
0 commit comments