Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions docs/version-control/branch-history/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: Branch history
description: View and manage the branch history on your branch.
---

# Branch history

In Nordcraft, changes are automatically committed to a branch when changes are made. Think of it as an "auto save" feature. All previous commits to your active branch are shown in the `History` tab. The branch history is a tool that allows you to see every commit that has been made to the active branch. Each entry shows when the changes were committed to the branch, who made the changes, as well as the description for those changes.

![Open the branch history using the History tab.|16/9](version-control-history.webp 'Branch history')

## Preview changes

Every commit in the branch history can be previewed. When previewing a commit, the editor will update to give a snapshot of how your project looked at the time of that commit. You can look through all of the project, but you cannot make any changes to the commit. You can preview a commit either by opening the dropdown menu on a commit in the list (#1 in the image) and selecting `Preview commit`, or expanding the commit and clicking one of the changes. If the change is a deletion, the editor will preview the commit before, so that you can view the value that was deleted. In order to close the preview, click the `Stop previewing` button in the top right corner of the viewport.

## Roll back changes

If you want to revert some of the changes that have been made on your branch, you can roll them back. You can choose to roll back the entire branch or the file that is currently open. Rolling back will revert the branch or file to the state of the chosen commit. You can roll back a file or branch to a specific commit by right clicking the commit and selecting `Rollback current file to this commit` or `Rollback branch to this commit`.

::: tip
Rolling back a branch or a file is not irreversible. It will create a new commit with the rolled back changes. You can roll back to the original commit, if you change your mind.
:::
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions docs/version-control/managing-changes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ Switch branches from existing branches in the project, and view and manage chang

### Create and switch branches

Create a new branch by clicking the [kbd]+[kbd] button in the top right corner of the header of the version control panel. This will open a dialog to name and create the branch. You can switch between existing branches using the input in the `Active` section of the version control panel.
Create a new branch by clicking the [kbd]+[kbd] button in the top right corner of the header of the version control panel. This will open a dialog to name and create the branch. You can switch between existing branches using the input in the `Changes` tab of the version control panel.

### View changes in your active branch

The changes in your active branch are shown in the `Active` section.
The changes in your active branch are shown in the `Changes` tab.

![Changes are shown as items with an icon and a name, and letter to the right describing the type of change. The image is annotated corresponding to the sections below.|16/9](version-control-changes.webp 'View changes')

All files that have been modified in your active branch are listed in the `Active` section. Changes are calculated by comparing your active branch to the state of the main branch at the point of branch creation. Since the main branch may also change when other branches are published, the original main branch and current main branch may not be the same at the when the changes are calculated. The original state of the main branch at the point of a branch creation will be referred to as the `ancestor branch`.
All files that have been modified in your active branch are listed in the `Changes` tab. Changes are calculated by comparing your active branch to the state of the main branch at the point of branch creation. Since the main branch may also change when other branches are published, the original main branch and current main branch may not be the same at the when the changes are calculated. The original state of the main branch at the point of a branch creation will be referred to as the `ancestor branch`.

Each change is marked with an icon and name representing the change, as well as a letter describing the type of change (#1 in the image):

- `C`: something has been created. The page, element, component, formula, or workflow etc. does not exist in the ancestor branch.
- `D`: something has been deleted. It exists in the ancestor branch, but not in the current branch.
- `E`: something has been edited. It exists in both branches, but in different states.

If something has been edited, you can dive deeper into the changes by expanding the item. This will reveal a list of all of the changes made to that item (#2 in the image). As long as there are edited items in a list, it can be expanded to show those changes. Additionally, whenever you click to select a created or edited change in the `Active` section, the value will be shown in the editor (#3 in the image). For example, if you made changes to a formula, clicking on the affected item will open the formula editor.
If something has been edited, you can dive deeper into the changes by expanding the item. This will reveal a list of all of the changes made to that item (#2 in the image). As long as there are edited items in a list, it can be expanded to show those changes. Additionally, whenever you click to select a created or edited change in the `Changes` tab, the value will be shown in the editor (#3 in the image). For example, if you made changes to a formula, clicking on the affected item will open the formula editor.
Deleted changes cannot be shown in the current branch since they no longer exist, but may be explored on the main branch via the context menu.

## Main branch
Expand All @@ -45,7 +45,7 @@ When there are changes in the `Main` section, it means that your active branch i

Overlapping changes between your active branch and main are called conflicts. Overlapping changes cannot be synchronised automatically, since there are two possible outcomes in that conflict. In order to resolve a conflict, you will need to accept one of the two changes.

- Conflicting changes on your active branch can be accepted by right clicking an item in the `Active` section and selecting `Accept current`.
- Conflicting changes on your active branch can be accepted by right clicking an item in the `Changes` tab and selecting `Accept current`.
- Conflicting changes on main can be accepted by right clicking an item in the `Main` section and selecting `Accept incoming`.

### Publish changes
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/version-control/managing-changes/version-control-icon.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading