Skip to content

Commit 0c24305

Browse files
committed
Started on branch
1 parent a8e96cb commit 0c24305

3 files changed

Lines changed: 29 additions & 13 deletions

File tree

content/en/docs/refguide/version-control/using-version-control-in-studio-pro/_index.md

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -201,14 +201,42 @@ Select a revision to see additional details, such as related stories, changed do
201201

202202
## Reverting Changes {#revert-changes}
203203

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+
204208
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.
205209

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.
207211

208212
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.
209213

210214
{{< figure src="/attachments/refguide/version-control/using-version-control-in-studio-pro/revertx2.png" alt="Two ways of reverting" class="no-border" >}}
211215

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.
231+
232+
{{< figure src="/attachments/refguide/version-control/using-version-control-in-studio-pro/revert-changes-git.png" class="no-border" >}}
233+
234+
#### Reverse Merge
235+
236+
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+
212240
## Dealing With Conflicts {#conflicts}
213241

214242
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
276304

277305
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/).
278306

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.
286-
287-
{{< figure src="/attachments/refguide/version-control/using-version-control-in-studio-pro/revert-changes-git.png" class="no-border" >}}
288-
289-
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-
291307
#### Replacing the Main Line with a Branch Line
292308

293309
There are two methods for fully replacing your main line with a branch line.
7.05 KB
Loading
1.91 KB
Loading

0 commit comments

Comments
 (0)