Skip to content

Waste Commits #12283

Closed
Closed

Description

@goyalyashpal

Describe the feature or problem you’d like to solve

Sometimes a bad change in local repo might be mistakenely committed.
To avoid them being pushed, currently, it seems that only option is to delete the repository. Which feels like a nuclear option imo.

Proposed solution

Ability to delete/remove local non-pushed commits

How will it benefit Desktop and its users?

In the above problem, this will be a life savour if there is big sized project.

Additional context

Add any other context like screenshots or mockups are helpful, if applicable.

Activity

  1. goyalyashpal commented on May 25, 2021

    @goyalyashpal
    Author

    sort of tangentially related: #7903
    duplicate issues searched by: delete commits

  2. tidy-dev commented on May 25, 2021

    @tidy-dev
    Contributor

    HI @yashpalgoyal1304. We actually do have feature that I believe will help.

    If your commits are local non-pushed commits, they will have this up arrow indicator on them.
    image

    Any commit with that arrow can be undone via the undo button on the changes tab (which is only present when there are unpushed commits)
    Screen Shot 2021-05-25 at 1 36 52 PM

    This will do a git reset --soft on the last local commit keeping those changes locally so you can modify them or recommit them.

    Hope that helps. :)

  3. goyalyashpal commented on May 25, 2021

    @goyalyashpal
    Author

    yeah, it worked. niiice. Thanks a lot. 👍

  4. goyalyashpal commented on May 25, 2021

    @goyalyashpal
    Author

    For ux suggestion:

    1. it slips from the view. as it seems to be sticking in the ui boundaries. the padding from bottom can be improved to make it more vertically center aligned.
      gimp-2 10_BIYUlegY6l

    2. views on giving the undo button there??
      GitHubDesktop_T7VvfuY6Jv

  5. tidy-dev commented on May 25, 2021

    @tidy-dev
    Contributor

    Thank you for your suggestions. We are currently in discussion for something like you are suggesting in bullet 2. 🙂

  6. goyalyashpal commented on May 26, 2021

    @goyalyashpal
    Author

    also, the undo-ing doesnt work well in case there are commits after the wrong commit.

    w5NTPQLMkg.mp4
  7. tidy-dev commented on May 26, 2021

    @tidy-dev
    Contributor

    Here is the issue we are tracking Amend/Undo feedback under if you want to add anything there. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions