Skip to content

Make fetch before remote operations the default #98

@alexrinass

Description

@alexrinass

Fetching the remote branch before finish (and potentially other commands) should be enabled by default. Currently gitflow.<type>.<cmd>.fetch defaults to false, which means users operating on branches with remotes are working against potentially stale local refs.

Motivation

Without a fetch, operations like finish may:

  • Miss that the remote branch has new commits (sync check uses stale tracking refs)
  • Delete a branch that appears "not fully merged" because the remote merge info is missing locally
  • Produce confusing results when local and remote have diverged

Most users working with remotes expect git-flow to be aware of the current remote state.

Proposed Change

Change the default for gitflow.<type>.finish.fetch and gitflow.<type>.start.fetch to true. Users can opt out with --no-fetch or by setting the config to false.

This should be coordinated with the robust fetch/sync rework to ensure fetch failures are handled gracefully (skip silently when no remote is configured, error clearly when remote is unreachable).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions