Skip to content

Feature request: but log & but revert #12390

@jeyj0

Description

@jeyj0

My use-case was this:

  • Target branch (dev) had commit abc
  • I wanted to revert that commit
  • I didn't know the commit-hash
  • I wanted to revert that commit as a new revert commit on one of my active branches

How I'd like to have done it:

  • but log (to show not just commits on active branches, but also target branch's history)
  • copy commit-hash (abc)
  • but revert abc, either interactively choosing correct branch, or providing it as another argument

How I worked around it (this could've been more efficient, but I figured it out step-by-step):

  • git log → find commit-hash (not nice to find though)
  • copy commit-hash (abc)
  • git revert abc → created on gitbutler/workspace 🤮
  • git log → copy revert-commit's hash (cba)
  • git reset --soft 1234 (copied command from gitbutler ui to get back to previous state)
  • discarded changes from revert commit
  • but pick cba (cherry-pick revert commit to correct branch)

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIThe command-line program `but`

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions