How to use git flow hotfix and hotfix finish like operations in Ondev #3078
Brent Hitzeroth opened 1 week ago

Does Onedev allow using the git flow hotfix and finish operations and if so is it only command line?

  • Service Desk commented 1 week ago

    OneDev does not ship a Git Flow command such as git flow hotfix start / git flow hotfix finish in the UI. You can still run that workflow against a OneDev project: from the Git command line, or with the equivalent branch / pull request / tag steps in the UI.

    Git Flow hotfix finish is: branch from production (master or main), apply the fix, merge into production, tag that merge, merge the same fix into develop, then delete the hotfix branch.

    Command line

    OneDev is a Git server. If your account can create and push branches and tags, local Git Flow works as usual:

    git flow hotfix start 1.2.1
    # commit the fix
    git flow hotfix finish 1.2.1
    git push origin master develop --tags
    git push origin --delete hotfix/1.2.1
    

    Use your real production / develop branch names in the push. If a remote hotfix branch was never pushed, the delete command is unnecessary.

    If branch protection on production or develop requires review or a successful build, those finish/push merges will be rejected and OneDev will ask you to open a pull request instead. See Code Review and Pull Request Approval.

    UI equivalent (no Git Flow CLI)

    Same workflow without git flow:

    1. Start the hotfix. Open Code → Branches → Create Branch. Name it for example hotfix/1.2.1, and create it from the production branch or from the production tag.
    2. Commit the fix on that branch (local clone and push, or a workspace).
    3. Finish into production. Open a pull request from the hotfix branch to master/main. Merge it after review/CI. Then create the version tag from Code → Tags → Create Tag, or from the merged commit. Tags can also be created by a CI Create Tag step.
    4. Finish into develop. Open a second pull request from the same hotfix branch (or from the tagged production commit) to develop, and merge it so the next release still contains the fix.
    5. Delete the hotfix branch after both merges.

    A pull request in OneDev has a single target branch, so finish is two pull requests (production and develop), not one click.

    Please confirm if this covers what you need, or if you want a dedicated Git Flow hotfix/finish action in the UI.

  • Brent Hitzeroth commented 1 week ago

    Thank you for your response.

  • Brent Hitzeroth changed state to 'Closed' 1 week ago
    Previous Value Current Value
    Open
    Closed
  • Brent Hitzeroth commented 18 hours ago

    It would be helpful for dev flow if you could add dedicated Git Flow hotfix/finish action in the UI.

  • Brent Hitzeroth changed state to 'Open' 18 hours ago
    Previous Value Current Value
    Closed
    Open
1/1
Type
Question
Priority
Normal
Assignee
Labels
No labels
Issue Votes (0)
Watchers (3)
Reference
OD-3078
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover