You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Amend last commit feature is very useful and exists in many git clients, but not in GitHub Desktop.
It would be nice if we have it in GitHub Desktop too.
Current workaround is click Undo and commit again but I've to carefully check what I want to commit again.
Version
GitHub Desktop version: 0.5.5
Thanks.
Reacted by Sindre Sorhus, Andrea Di Giorgi, Brian Surowiec, Riley Labrecque, Pachoyan, Anton, Andrew McClenaghan, Dan Le, Elisée Maurer, shanberg and 84 more
Reacted by Mihai Codoban, richburgess and Renato Gama
This idea is interesting for the future, but this is beyond the scope of our current roadmap.
I'm going to add the future-proposal label to this issue and close it out, so that we don't get overwhelmed with our backlog! We'll revisit these as part of our next planning session.
Reacted by Stevoisiak, Helmut M Juskewycz, Andrei Ionescu, agutinolympus, Jose Browne, Donovan, Ülgen Sarıkavak, Rodrigo Díaz, roger_s, Fabio Buracchi and 14 more
Please hold off on this. We haven't had a chance to evaluate these proposals, and I'm pretty sure this needs some design thought. @meyer if you have thoughts on how this should look/feel/behave feel free to share them in here as a starting point.
I find myself really often committing things with the message "f" as a reminder to rebase -i and mark as fixup later. Sometimes I forget and I push these changesets :(
Would be good to see this - maybe a tickbox near the commit button for "Amend last commit" - ticking it should allow committing without entering a summary/description (or ticking it could pre-fill the previous messages if the fields are blank, for easier typo-correction).
Oh, and show a warning if the previous changeset may have been pushed ;-) (I'm not sure if Git has any equiv of Mercurial's phases?)
The first is apparently being worked on already in a pull request, and hopefully will be in GitHub Desktop soon. The second one is kind of on the roadmap, although perhaps not in the form I want (a visual graph). That leaves the last one. Being able to quickly and easily amend the last commit is very useful to me.
Reacted by zaus, Stan Mots, Poseidon, John David Heinzmann, Helmut M Juskewycz, Christopher Papa and Wolkenfarmer
I use amend all the time on Gitx and really miss it when I've tried to swap to GHD.
They have an amend checkbox, if you check it:
the previous commit message shows up in the commit message box to edit
any changes in the previous commit are now in the staged state
Because things are by default not staged in Gitx this works well. You can add / remove stuff as needed. Since things default to staged on GHD, it presents a problem since it might be hard to tell what was part of the commit previous commit and what are new changes.
Reacted by Dominik Guzei, Oliver Coley, ves and Christopher Papa
I often (several times per day) fixup the previous commits, and I use git commit --fixup and rebase -i --autosquash to quickly do it. Having UI support for this would be really helpful.
This is a generalization of git commit --amend. Rather than fixing up the latest commit, the UI client could have an option to choose an arbitrary commit to fixup. The UI could make amending the last commit the fast UI option, and then require some extra click to get to fixing up any commit.
Reacted by Brian Surowiec, Koen Punt, gpoblon and Vilém Jeniš
While not directly related to inter-branch rebasing described [in that issue], the fixup/amend (#1644) feature request may be a great addition to the larger rebase workflows being considered.
At the very least, could we consider re-opening that issue as part of the larger re-prioritization of the milestone?
Amending last commit is a pretty standard part of my workflow (usually before pushing my branch). Would be awesome to be able to just "add changes to last commit".
But as I mentioned, we're not planning to revisit that decision anytime soon and this issue is unrelated to that. Please let me know if you'd like to look into exploring the technical aspects of preserving the state you were in prior to a commit as part of "Undo."
I think there is a lot of value in this feature, however it is implemented.
That said, I'm less confident it'll be as quick as I estimated before, knowing that reinventing portions of git inside the app is potentially required.
But more importantly, I'm less enthusiastic about helping to improve what I now see is a git client whose caveats show that it favors non-technical users, which mostly excludes me from its target audience.
That's totally fine @sdegutis, no worries if you'd prefer not to work on it. GitHub Desktop is used daily by a ton of people, both technical and non-technical, but it's definitely a more opinionated design, and that isn't always going to align with the preferences of everyone. We genuinely want people to use the tools that work best for them to build awesome stuff on GitHub.
Like I said, I'm not opposed to working on it, I'm just not as enthusiastic or confident as before. And I'm not entirely outside the target audience, either, as I'm so far using it in place of Magit with acceptable success.
But I'm still convinced your design decision doesn't even help your own goal. If you compare the outcomes of both sides of the decision, non-technical users have no disadvantage to the git index being changed invisibly behind the scenes for them, and technical users have the ability for Github Desktop to work in conjunction with other apps, e.g. Terminal or VS Code.
That's the only reason I'm still mentioning this. But now that I think I've explained it as clearly as I can both here and in #4408 , I feel comfortable dropping the topic. Thanks for your time and patience in reading my feedback and communicating about these questions and concerns.
Hi @sdegutis, thanks for the response. Because this is excluded to the last commit, I think we'd want to consider this as part of the existing "Undo" functionality and make it a more proper "Undo" that preserves the state you were in prior to making the commit.
I think Amend and Undo are two completely different things. By undoing, I understand to erase the last commit, there's a git command for that (git reset), which could also be supported. That's good!
But Amend is used to add something else to the previous commit. I often commit 10 files, and while working on the next feature, I have already 10 more files edited, and find something would fit better on the last commit. Amend allows me to just insert that one small fix to it. If I undo the last commit just for that, now I have 10 previously commited files with 10 new ones, all on the same place. I've done that, and that's chaos, please don't mix those two concepts!
I understand having an Undo feature is good for people uninitiated with git, but don't agree with this approach. Instead of creating a new workflow and inserting git concepts in it, we should try to make already stablished git concepts and workflows user-friendly. Having separated Undo and Amend make things clearer for experienced users, without over-complicate things. Let new users learn git, easily, without noticing!
Reacted by sdegutis, JaneSmith, AshleyAmazing and Jimmy He
Let new users learn git, easily, without noticing!
In fact, one cool feature would be to have hover-tooltips that show the exact command a button would perform behind the scenes, so users can learn how to do the same thing with CLI if ever needed.
After trying out Github Desktop for a week or two, I'm convinced I'm not part of the target audience, and given the conflation of high-level and low-level concepts, I'm not sure who the target audience is. But in any case, I have to unfortunately withdraw my offer to help with this app. But it will be interesting to see how this app sparks and encourages competition in Git GUIs.
I think it cold be done elegantly by adding a button chevron on the Commit button.
If you think it is still will confuse a user, make those options enabled through configuration with something like "enable advance commit options" which will enable the chevron with drop down menu on the commit button which can house additional options like "amend previous commit"
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.
For ux suggestion:
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.
views on giving the undo button there??
also, the undo-ing doesnt work well in case there are commits after the wrong commit.
...GitHub Desktop is used daily by a ton of people, both technical and non-technical, but it's definitely a more opinionated design, and that isn't always going to align with the preferences of everyone. We genuinely want people to use the tools that work best for them to build awesome stuff on GitHub.
I stumbled on this issue because i found myself needing this feature (amend) this morning. As someone who started using Desktop as a non-technical user, having become a technical user over time I find it sad that the more I learn about "real" git the more I grow out of Desktop.
In any case thanks to the developers for making Desktop, it really served me well as a new GitHub user. Not going to lie I'm off to look for alternative now but I'll try to keep checking back for when this feature (and hopefully interactive rebasing) are added.
Activity
xt0rted commentedon May 19, 2017
I typically commit the missed/extra changes and then rebase & squash, this would certainly speed that process up.
joshaber commentedon Jun 29, 2017
Thanks for the suggestion!
This idea is interesting for the future, but this is beyond the scope of our current roadmap.
I'm going to add the
future-proposallabel to this issue and close it out, so that we don't get overwhelmed with our backlog! We'll revisit these as part of our next planning session.levinit commentedon Sep 21, 2017
useful function
meyer commentedon Jan 19, 2018
@joshaber do you all accept PRs for features outside the current roadmap?
j-f1 commentedon Jan 19, 2018
@desktop/design Does this need some design 💭?
If not, feel free to go ahead, @meyer.
shiftkey commentedon Jan 19, 2018
Please hold off on this. We haven't had a chance to evaluate these proposals, and I'm pretty sure this needs some design thought. @meyer if you have thoughts on how this should look/feel/behave feel free to share them in here as a starting point.
DanTup commentedon Mar 20, 2018
I find myself really often committing things with the message "f" as a reminder to
rebase -iand mark asfixuplater. Sometimes I forget and I push these changesets :(Would be good to see this - maybe a tickbox near the commit button for "Amend last commit" - ticking it should allow committing without entering a summary/description (or ticking it could pre-fill the previous messages if the fields are blank, for easier typo-correction).
Oh, and show a warning if the previous changeset may have been pushed ;-) (I'm not sure if Git has any equiv of Mercurial's phases?)
JaneSmith commentedon Mar 30, 2018
For what it's worth, the three major reasons I use SourceTree instead of GitHub Desktop whenever possible are:
The first is apparently being worked on already in a pull request, and hopefully will be in GitHub Desktop soon. The second one is kind of on the roadmap, although perhaps not in the form I want (a visual graph). That leaves the last one. Being able to quickly and easily amend the last commit is very useful to me.
phuibonhoa commentedon May 30, 2018
I use amend all the time on Gitx and really miss it when I've tried to swap to GHD.
They have an amend checkbox, if you check it:
Because things are by default not staged in Gitx this works well. You can add / remove stuff as needed. Since things default to staged on GHD, it presents a problem since it might be hard to tell what was part of the commit previous commit and what are new changes.
cdmihai commentedon Aug 13, 2018
I often (several times per day) fixup the previous commits, and I use
git commit --fixupandrebase -i --autosquashto quickly do it. Having UI support for this would be really helpful.This is a generalization of
git commit --amend. Rather than fixing up the latest commit, the UI client could have an option to choose an arbitrary commit to fixup. The UI could make amending the last commit the fast UI option, and then require some extra click to get to fixing up any commit.billygriffin commentedon Nov 14, 2018
From #5953 (comment):
digitalmaster commentedon Apr 14, 2020
Amending last commit is a pretty standard part of my workflow (usually before pushing my branch). Would be awesome to be able to just "add changes to last commit".
21 remaining items
billygriffin commentedon Mar 16, 2021
@sdegutis Here's some historical context on staging: #4408 (comment)
But as I mentioned, we're not planning to revisit that decision anytime soon and this issue is unrelated to that. Please let me know if you'd like to look into exploring the technical aspects of preserving the state you were in prior to a commit as part of "Undo."
sdegutis commentedon Mar 16, 2021
Thanks for the link, and sure.
sdegutis commentedon Mar 16, 2021
I think there is a lot of value in this feature, however it is implemented.
That said, I'm less confident it'll be as quick as I estimated before, knowing that reinventing portions of git inside the app is potentially required.
But more importantly, I'm less enthusiastic about helping to improve what I now see is a git client whose caveats show that it favors non-technical users, which mostly excludes me from its target audience.
billygriffin commentedon Mar 16, 2021
That's totally fine @sdegutis, no worries if you'd prefer not to work on it. GitHub Desktop is used daily by a ton of people, both technical and non-technical, but it's definitely a more opinionated design, and that isn't always going to align with the preferences of everyone. We genuinely want people to use the tools that work best for them to build awesome stuff on GitHub.
sdegutis commentedon Mar 16, 2021
Like I said, I'm not opposed to working on it, I'm just not as enthusiastic or confident as before. And I'm not entirely outside the target audience, either, as I'm so far using it in place of Magit with acceptable success.
But I'm still convinced your design decision doesn't even help your own goal. If you compare the outcomes of both sides of the decision, non-technical users have no disadvantage to the git index being changed invisibly behind the scenes for them, and technical users have the ability for Github Desktop to work in conjunction with other apps, e.g. Terminal or VS Code.
That's the only reason I'm still mentioning this. But now that I think I've explained it as clearly as I can both here and in #4408 , I feel comfortable dropping the topic. Thanks for your time and patience in reading my feedback and communicating about these questions and concerns.
rsodre commentedon Mar 16, 2021
I think Amend and Undo are two completely different things. By undoing, I understand to erase the last commit, there's a git command for that (git reset), which could also be supported. That's good!
But Amend is used to add something else to the previous commit. I often commit 10 files, and while working on the next feature, I have already 10 more files edited, and find something would fit better on the last commit. Amend allows me to just insert that one small fix to it. If I undo the last commit just for that, now I have 10 previously commited files with 10 new ones, all on the same place. I've done that, and that's chaos, please don't mix those two concepts!
I understand having an Undo feature is good for people uninitiated with git, but don't agree with this approach. Instead of creating a new workflow and inserting git concepts in it, we should try to make already stablished git concepts and workflows user-friendly. Having separated Undo and Amend make things clearer for experienced users, without over-complicate things. Let new users learn git, easily, without noticing!
sdegutis commentedon Mar 16, 2021
In fact, one cool feature would be to have hover-tooltips that show the exact command a button would perform behind the scenes, so users can learn how to do the same thing with CLI if ever needed.
sdegutis commentedon Mar 24, 2021
After trying out Github Desktop for a week or two, I'm convinced I'm not part of the target audience, and given the conflation of high-level and low-level concepts, I'm not sure who the target audience is. But in any case, I have to unfortunately withdraw my offer to help with this app. But it will be interesting to see how this app sparks and encourages competition in Git GUIs.
rakhmanov commentedon Apr 29, 2021
I think it cold be done elegantly by adding a button chevron on the Commit button.
If you think it is still will confuse a user, make those options enabled through configuration with something like "enable advance commit options" which will enable the chevron with drop down menu on the commit button which can house additional options like "amend previous commit"
goyalyashpal commentedon May 26, 2021
Moving over my input from #12283
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.
For ux suggestion:
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.

views on giving the undo button there??

also, the undo-ing doesnt work well in case there are commits after the wrong commit.
VorTechnix commentedon Jun 3, 2021
I stumbled on this issue because i found myself needing this feature (amend) this morning. As someone who started using Desktop as a non-technical user, having become a technical user over time I find it sad that the more I learn about "real" git the more I grow out of Desktop.
In any case thanks to the developers for making Desktop, it really served me well as a new GitHub user. Not going to lie I'm off to look for alternative now but I'll try to keep checking back for when this feature (and hopefully interactive rebasing) are added.
sergiou87 commentedon Jun 3, 2021
Thanks for your feedback!
In case you're interested, we're actively working on adding "amend" to the app: #12353
And regarding interactive rebase, squashing is already available in beta (#12235) and reordering commits will be Soon™ (#12299).
VorTechnix commentedon Jun 3, 2021
Thanks for the heads up and for your work on this.