Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put "edit committ" in the context menu #2794

Closed
mortb opened this issue May 7, 2015 · 4 comments
Closed

Put "edit committ" in the context menu #2794

mortb opened this issue May 7, 2015 · 4 comments

Comments

@mortb
Copy link

mortb commented May 7, 2015

I think it would be nice to have an "edit commit" command in the context menu.
We use gerrit and we tend to some edits to my commits before they are merged in to the repository.
We mostly do my edits by using interactive rebase with either "edit" or "fixup" commits. This is somewhat error prone as errors do occur when moving lines in the commit list.

Having an option in the context menu to edit the commit without having to interactive rebase would really be a killer feature for us.

@Radrik5
Copy link
Contributor

Radrik5 commented May 7, 2015

@mortb, in the context menu for the commit you want to edit try "Advanced - Fixup commit". Then run interactive rebase with Autosquash option.

@mortb
Copy link
Author

mortb commented May 7, 2015

@Radrik5, many thanks for your reply.
That is good. but what if we could do it all in one step with no need for interactive rebase?
I also have to click "show options" in rebase dialog to check the "interactive rebase" checkbox which makes it many clicks

I do this quite a lot so having this in the context menu would be a good feature for me.

@Radrik5
Copy link
Contributor

Radrik5 commented May 8, 2015

Anyway, behind the scenes there will be interactive rebase. Git doesn't have an "edit commit" command and Git Extensions is just a wrapper over Git commands. In addition, merge conflicts are possible and you will have to resolve them manually and then click the "Continue rebase" button. Without merge conflicts you can edit only the most recent commit, but for that there is "Amend Commit" option.

What do you think about adding "Commit & Autosquash" button to the "Fixup commit" window? It will call interactive rebase with the parent of the selected commit and "Autosquash" option.

@mortb
Copy link
Author

mortb commented May 8, 2015

Yeah, that would seem to be a nice solution.
To summarize you mean that the command:
"context menu" -> Advanced -> Fixup
would bring up the commit dialog. The commit dialog would be like the "ordinary" commit dialog but there would be a "Commit & auto squash" button. (maybe some ordinary buttons needs to be disabled / invisible)

Pressing the "commit & auto squash" would (behind the scenes) lead to

  1. the files being committed
  2. an interactive rebase being run which would fixup (meld) the commit into the selected commit

Yes that would be nice 👍
Only that for me this would not be in the "advanced" sub menu as I do it a lot, but I could live with that....

@jbialobr jbialobr added this to the 2.50 milestone Apr 23, 2017
@jbialobr jbialobr removed this from the 2.50 milestone Jun 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants