Hygiene and workflow
Repository workflow
15 min read
Every team has its own way of working with branches: where a feature starts from, where it goes back to, whether it gets in through a merge request or a local merge, how an urgent fix reaches production. The workflow records that way of working in the repository. With one chosen, Versora:
- creates each new branch from the right base ("Start");
- finishes each branch the way the workflow says: it opens the merge request with the right target or does the local merge, showing the steps first ("Finish");
- takes each environment to the next one, in GitLab flow ("Promote");
- warns you when something leaves the workflow (see Workflow health).
The choice is per repository and is stored in its local git config (versora-flow.*). Nothing is
saved until you choose a workflow.
| Preset | In one sentence |
|---|---|
| Trunk-based | "Short branches that go back to main through merge requests. What DORA recommends." |
| GitLab flow | "One merge request per feature into main; environments get main by promotion." |
| Release branches | "Everything goes into main; each maintained version has its release/x.y." |
| Gitflow | "main and develop; feature, release and hotfix with local merges." |
The branch types (feature, fix, bugfix, release, hotfix) keep their English names in every language, like the other git terms.
"All work starts from main and goes back to it within a few days, through a merge request. No integration or environment branches; versions are tags on main (New version…)."
| Type | Prefix | Starts from → goes to | When finishing | Local merge | Delete |
|---|---|---|---|---|---|
| Feature | feature/ | main → main | Open merge request | Rebase and fast-forward | yes |
| Fix | fix/ | main → main | Open merge request | Rebase and fast-forward | yes |
Its own health warning: Long-lived branch after (days), default 3, and "Too many active branches" with more than 3 active work branches.
"Features and fixes go into main through merge requests. Each environment (e.g. staging, production) is a branch that gets the one above it by promotion. A hotfix starts from production and goes back to the environments above and to main."
| Type | Prefix | Starts from → goes to | When finishing | Local merge | Delete |
|---|---|---|---|---|---|
| Feature | feature/ | main → main | Open merge request | Merge (--no-ff) | yes |
| Fix | fix/ | main → main | Open merge request | Merge (--no-ff) | yes |
| Hotfix | hotfix/ | production → production, and back to staging and main | Open merge request | Merge (--no-ff) | yes |
Default environments, in promotion order: staging and production (the path becomes
main → staging → production). Its own health warning: Environment behind after (days),
default 7.
"Features and fixes go into main. A release/x.y branch starts from main and lives while the version is maintained; each of its versions is a tag. A hotfix starts from the release, goes into it, and the fix goes up to main by cherry-pick."
| Type | Prefix | Starts from → goes to | When finishing | Local merge | Delete |
|---|---|---|---|---|---|
| Feature | feature/ | main → main | Open merge request | Merge (--no-ff) | yes |
| Fix | fix/ | main → main | Open merge request | Merge (--no-ff) | yes |
| Release | release/ | starts from main; stays open | version (tag) | — | no |
| Hotfix | hotfix/ | the release it came from → the release it came from, and the fix goes up to main by cherry-pick | Open merge request | Merge (--no-ff) | yes |
Default version tag prefix: v. Its own health warning: Forgotten release after (days),
default 14.
"Classic Gitflow (the same as the GITFLOW section and the git flow extension): features start from develop and go back to it; a release starts from develop and a hotfix from main; both finish with a merge into main, a tag and a merge back into develop."
| Type | Prefix | Starts from → goes to | When finishing | Local merge | Delete |
|---|---|---|---|---|---|
| Feature | feature/ | develop → develop | Local merge | Merge (--no-ff) | yes |
| Bugfix | bugfix/ | develop → develop | Local merge | Merge (--no-ff) | yes |
| Release | release/ | develop → main, tag, and back to develop | Local merge | Merge (--no-ff) | yes |
| Hotfix | hotfix/ | main → main, tag, and back to develop | Local merge | Merge (--no-ff) | yes |
No tag prefix by default. The branch names and the prefixes live in the gitflow.* keys (the
same as the GITFLOW section and the git flow extension). Its own
health warning: Forgotten release after (days), default 14.
- WORKFLOW section of the left panel: Review and use… (in the suggestion) or Choose workflow….
- WORKFLOW section: right-click the header › Choose workflow… or, with a workflow in use, Configure the workflow (GitLab flow)…. The badge with the workflow's name in the header also opens the configuration ("Workflow of this repository: GitLab flow. Click to configure.").
- Palette (Ctrl+P): "Workflow: choose the repository workflow…" or "Workflow: configure (GitLab flow)…" ("Trunk-based, GitLab flow, release branches or Gitflow").
- Preferences: Preferences › Workflow › This repository › Choose… or Configure….
- In the suggestion notice: Review and choose….
- Open the Repository workflow window. The introduction reminds you: "Choose how branches in this repository start and finish. … It's stored in this repository's local git config."
- Choose the preset. The one Versora suggests has the suggested badge; the current one, in use.
- Adjust the permanent branches:
- Main branch (in Gitflow, Production branch (main));
- Integration branch (develop), only in Gitflow;
- Environments, in promotion order, only in GitLab flow, separated by commas or spaces. The tooltip shows the resulting path: "Path: main → staging → production";
- Version tag prefix, in the Release branches and Gitflow presets.
- In the Branch types table, adjust per type:
- Prefix (e.g.
feature/); - When finishing: Open merge request or Local merge (the release type of release branches shows "version (tag)", with no choice);
- Local merge: Merge (--no-ff) ("Merge with a merge commit (--no-ff), as Gitflow does."), Rebase and fast-forward ("linear history") or Squash ("all the branch's commits become a single one in the target");
- Delete: delete the branch when finishing. The Starts from → goes to column shows each type's route. Below the table, sentences sum up how the release and the hotfix close (e.g. "Hotfix: goes into production and back to the environments above and to main.").
- Prefix (e.g.
- Under Health warnings, adjust the preset's day limit (from 1 to 365).
- Click Use this workflow (or Save, if the preset was already in use). The notice confirms: "GitLab flow workflow in use in this repository."
The choice goes into the repository's local config. Only what differs from the preset's default is saved:
git config --local versora-flow.preset gitlab
git config --local versora-flow.main main
git config --local versora-flow.environments "qa staging production" # if changed
git config --local versora-flow.feature.strategy squash # if changed
git config --local versora-flow.envdays 5 # if changed
Other possible keys: versora-flow.integration, versora-flow.tagprefix,
versora-flow.releasedays, versora-flow.branchdays and, per type,
versora-flow.<type>.prefix, .finish, .strategy and .delete.
In Gitflow, the names and prefixes go into the gitflow.* keys (the same as the git flow
extension), and develop is created if it doesn't exist yet, from origin/develop or from the
production branch:
git config --local gitflow.branch.master main
git config --local gitflow.branch.develop develop
git config --local gitflow.prefix.feature feature/
git config --local gitflow.prefix.bugfix bugfix/
Since it's in the local config, the workflow doesn't go to the server: each clone chooses its own.
- "In Gitflow, the main branch and the integration branch (develop) must be different."
- "GitLab flow needs at least one environment branch (e.g. staging, production)."
- "The environment "staging" appears more than once (or is the main branch itself)."
- "The prefix "feat" of the feature type won't work: it must be set and form a valid branch name."
- "Two branch types use the same prefix "feature/"."
- "The prefix "release" would also match the permanent branch "release-main"."
- "The branch "trunk" doesn't exist in this repository or on the remote.": the main branch you entered doesn't exist.
- "This repository's gitflow.* config stays as it is; only the GITFLOW section gives way to the WORKFLOW section.": appears when the repository already has Gitflow and you choose another preset.
The first time you open a repository with no workflow chosen, Versora looks at the branches and the config and suggests a preset, once per repository. Nothing is saved until you choose.
The notice says, for example: "This repository seems to use the GitLab flow workflow. Choosing a workflow helps create and finish branches in the right place." Review and choose… opens the configuration on the suggested preset.
The WORKFLOW section shows the same suggestion ("Suggestion: Gitflow.") with the reason, for example:
- "This repository already has Gitflow set up (main and develop)."
- "Found the develop branch next to main."
- "Found environment branches: staging, production."
- "Found release branches: release/1.2, release/1.3."
- "No develop or environment branches: trunk-based is the simplest and the recommended one."
The buttons are Review and use… and Not now. After Not now, the section shows "No workflow chosen for this repository." and the Choose workflow… button.
Versora recognizes environments with these names, from closest to development to closest to
production: qa, test, testing; homolog, homologacao, hml; uat, acceptance;
staging, stage, stg; pre-production, preproduction, preprod, pre-prod;
production, prod, producao, prd. As the development branch, develop, development and
dev; as releases, release/…, releases/… and names ending in -stable.
| Option | Where | What it does | Default |
|---|---|---|---|
| Suggest a workflow when a repository is opened for the first time | Preferences › Workflow › Suggestion | "The app looks at the branches and the config (gitflow.*, develop, environments, releases) and suggests a workflow, once per repository. Nothing is saved until you choose." | on |
With a workflow chosen, the WORKFLOW section of the left panel shows:
- The permanent branches, as a path (in GitLab flow,
main → staging → production). An environment that doesn't exist yet appears as missing, with the Create button ("Create the staging environment branch from main"). An environment with a pending promotion shows Promote ("Promote main to staging (3 pending commits)") and the tooltip "3 commits from main haven't arrived here yet (oldest: 11/12/2026)"; one that's up to date shows "Up to date with main". - The branch types, each with Start ("Start a Feature (feature/… branch)"); right-clicking the type offers Start Feature….
- The branches of each type, with Finish ("Finish feature/login the way the workflow says") or, on the maintained release, Version ("Release a version of release/1.2 (New version…)"). The checked-out branch has the Current branch mark.
- Outside the workflow (collapsed): "Local branches whose name doesn't follow any type of the workflow".
- In the header, the badge with the workflow's name and the warning counter ("2 workflow warnings. Click to see them.").
Right-clicking the header offers Start work…, Workflow health… and Configure the workflow (…)…. The rows also have a context menu, with the same actions as the buttons, and work from the keyboard like the panel's tree (arrows, Enter, Shift+F10).
With a workflow in use, the WORKFLOW section takes the place of the GITFLOW section.
- WORKFLOW section: Start next to each type, or right-click the header › Start work….
- Palette (Ctrl+P): "Workflow: start Feature…" (one entry per type; "Creates feature/… where the workflow says").
- With no workflow chosen, Start first opens the workflow configuration.
- Open Start work.
- Choose the Branch type (Feature, Fix, Hotfix…).
- Type the Name (e.g.
tela-de-login) or, for a release, the Version (e.g.1.4). Spaces become hyphens. - Check Starts from. The base the workflow prescribes is marked "(workflow)". For the
hotfix in release branches, choose which
release/…it starts from. - Leave Check out the new branch checked to start on the branch right away (default).
- Read the preview: "Creates feature/tela-de-login from the newest tip of main (local or on the remote)."
- Click Start Feature. The notice confirms: "feature/tela-de-login created from origin/main."
The "newest" tip is the local branch's or the remote's, whichever is ahead:
git checkout --no-track -b feature/tela-de-login origin/main
# (without checkout: git branch --no-track feature/tela-de-login origin/main)
git config --local branch.feature/tela-de-login.versora-flow-base main
git config --local branch.feature/tela-de-login.versora-flow-start <starting-sha>
--no-track keeps the new branch from tracking origin/main (pull and push would go to the wrong
place). The two branch.<name>.versora-flow-* keys record where the work started from, so that
Finish and the workflow health know the target and the limit of what a hotfix takes back.
Ctrl+Z undoes the creation ("Create feature/tela-de-login").
- "The branch feature/tela-de-login already exists.": choose another name.
- "In the workflow, a hotfix starts from production. Starting elsewhere becomes a health warning.": you changed the base. You can go ahead, but the workflow health will point out "Wrong origin".
- "There's no release branch for the hotfix to start from. Start a release first.": in release branches, the hotfix needs an existing release.
- "An operation is stopped halfway (merge, rebase, cherry-pick…). Finish or abort it first.": the checkout isn't possible right now.
Tip
The issues' "Start work" also uses the workflow's base to create the branch. See Issues.
Finish closes the branch the way the workflow says: it opens the merge request with the right target or does the local merge, with the steps shown first.
- WORKFLOW section: Finish on the branch's row.
- Menu: right-click the branch › Finish Feature… (the type name changes). With a workflow in use, this item takes the place of "Gitflow: finish…".
- Palette (Ctrl+P): "Workflow: finish feature/login…" (for the current branch).
- In the Workflow health: the Finish… action of some warnings.
- Open Finish feature/login. Versora shows "Building the plan…" and then the summary: the type ("Feature by the workflow" or "parent in the stack"), how many commits go in ("4 commits") and the target.
- Choose How to finish:
- Open a merge request into main: "The usual form, with the target set; the push comes first if needed." The Delete source branch after merge box comes checked when the type deletes the branch and there's no going back to another branch. It's disabled with "The remote isn't a registered GitLab/GitHub." when there's no integration.
- Merge locally into main: shows the list of steps and the Delete feature/login when finishing box.
- Read the local merge steps, for example:
- "Merge feature/login into main (--no-ff)", or "Rebase feature/login onto main and fast-forward main", or "Squash feature/login into main (a single commit)";
- "Create the v1.4.0 tag on main" (or "The v1.4.0 tag already exists (it isn't created again)");
- "Merge release/1.4 back into develop" or "Bring the fix to main (cherry-pick)";
- "Delete the feature/login branch".
- Confirm with Finish Feature (local merge) or Open merge request….
- In the local merge, the final notice sums up what was done, for example "feature/login: merged
feature/login into main, branch feature/login deleted". In GitLab flow, when the target is
main, the notice offers the next step: Promote main to staging.
For a maintained release (release branches), Finish becomes Release a version of release/1.2…: "release/1.2 is a maintained release: it doesn't finish with a merge. Each version is a tag on the branch, created by New version… (version, changelog, commit and tag). The branch must be checked out for that." The New version… button opens New version, first checking out the branch if you confirm ("The version is created on the checked-out branch. Check out release/1.2 now?").
In Gitflow, the release and the hotfix also have the Version and changelog before finishing (New version…) box (with the branch checked out). See Gitflow.
- "Local main is behind origin/main: it's fast-forwarded before the merge."
- "feature/login has no commits that main doesn't have."
- "Everything in feature/login is already in main."
- After the merge request, when the fix needs to go back: "After the merge into production, the fix must go back to staging and main. The workflow health warns you and offers the merge request back."
- In GitLab flow: "After the merge, promote main to staging from the WORKFLOW section."
- "There are uncommitted changes: commit or stash them first."
- "A rebase is stopped halfway: finish or abort it first."
- "feature/login is checked out in another worktree (C:\…)."
- "The branch main doesn't exist in this repository or on the remote."
- "Can't tell where hotfix/1.2.1 goes: it didn't start from a known release branch."
Example of a GitLab flow hotfix finished by local merge:
# before each merge, the local target is brought up to date with the remote when it's only behind:
git update-ref refs/heads/production <origin/production> <old> # (or merge --ff-only, if it's the current one)
git checkout production --
git merge --no-ff --no-edit hotfix/corrige-login
git checkout staging -- && git merge --no-ff --no-edit hotfix/corrige-login
git checkout main -- && git merge --no-ff --no-edit hotfix/corrige-login
git checkout production --
git branch -d hotfix/corrige-login
With Rebase and fast-forward: git rebase <target> <branch>, git checkout <target> and
git merge --ff-only <branch>. With Squash: git merge --squash <branch> and a commit with
the message git prepared (or "Squash merge of ‹branch›"); in that case the branch is deleted with
git branch -D. When going back by cherry-pick (hotfix in release branches), only the hotfix's
own commits go to main, starting from the point recorded when it was started.
In Gitflow, Finish calls the same finish as the GITFLOW section (merge, tag and back to develop), with the branches updated first.
Ctrl+Z undoes the whole local merge at once ("Finish feature/login"): the branches go back, the created tag goes away and the deleted branch comes back.
On a conflict, "the operation stops; resolve it in the conflict editor, conclude and use Finish again: what's done is skipped. Ctrl+Z undoes everything."
The opened merge request stays on the server: Ctrl+Z doesn't close it.
In GitLab flow, each environment gets the one above it: main goes to staging, staging goes
to production.
- WORKFLOW section: Promote on the environment with pending commits.
- Menu: right-click the branch of the environment above › Promote main to staging….
- Palette (Ctrl+P): "Workflow: promote main to staging…" (one entry per step of the path).
- In the notice after finishing a branch into
main: Promote main to staging. - In the Workflow health: the action of the "Environment behind" warning.
- Click Promote. The window asks "Promote main to staging?" and explains: "Brings into staging what's already in main (the next GitLab flow environment)."
- Under How, choose:
- Open merge request main → staging; or
- Merge main into staging locally.
- Click Promote.
In the local merge, Versora updates the environment from the remote, does the merge (fast-forward when possible, so the environment ends up identical to the one above) and goes back to the branch you were on:
git checkout staging --
git merge --no-edit origin/main
git checkout feature/login -- # the branch you were on
Ctrl+Z undoes the local promotion ("Promote main to staging"). The opened merge request stays on the server.
- "main isn't on origin yet: push it before opening the merge request."
- "There are uncommitted changes. Commit or stash them first."
- "The branch "staging" is checked out in another worktree (…)."
When an environment on the path doesn't exist yet, the WORKFLOW section shows Create. The "Create the staging environment?" window explains: "Creates the staging branch from main (local only; push it afterwards)." Confirm with Create branch. Ctrl+Z undoes it ("Create staging").
- Open the workflow configuration and click Stop using.
- Confirm in "Stop using the workflow?": "The app goes back to following no workflow in this repository (the GITFLOW section comes back, if there's Gitflow). Branches don't change."
Versora removes the versora-flow.* keys from the local config. The gitflow.* keys and the
branches stay as they are.
- Preferences › Workflow: the open repository's workflow (Choose… / Configure…) and the suggestion when opening.
- Preferences › Checks: the protected branches still apply to the commit and push done by Finish.
- The administrator can hide or lock the Workflow Preferences page (id
flowsinpreferences_hidden/preferences_locked). See Policy keys.