Skip to content

Replace git checkout with git switch and add git restore support #4963

@lmBored

Description

@lmBored

Topic

I've just had this idea, is it recommended within lazygit to replace internal use of git checkout in lazygit with git switch for branch operations, and add git restore support for file-level operations

Your thoughts

This separation aligns with modern Git best practices (added in Git 2.23). Also internally, lazygit could encapsulate fallback logic to detect whether the user’s Git version supports these commands and default back to checkout/reset when necessary.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions