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

Add Edit functionality in Advanced menu #3166

Closed
lowdev opened this issue Apr 10, 2016 · 15 comments
Closed

Add Edit functionality in Advanced menu #3166

lowdev opened this issue Apr 10, 2016 · 15 comments

Comments

@lowdev
Copy link

lowdev commented Apr 10, 2016

Add Edit functionality in Advanced menu.
By clicking it, it will :

  • launch a git rebase interactive on one of the commit parent.
  • replace automatically the first "pick" by "e".

gitextension_editmenu

Btw, If it's ok with you i will do the same for the functionality "rename" a commit.

@Radrik5
Copy link
Contributor

Radrik5 commented Apr 10, 2016

Possible duplicate of #2794.

@lowdev
Copy link
Author

lowdev commented Apr 10, 2016

In some cases we cannot edit a commit with fixup...
For example, you have 3 commits : A, B, C.
You want fix the commit A with some change in the commit B, you need to use
edit functionality.

It's just a case there is some other when editing is useful.

About renaming a commit with git extension :
-> Click right on the commit
-> Click on "rebase on current branch...."
-> Click on "show options"
-> Check "Interactive rebase"
-> Click on rebase
-> edit the rebase interactive file : change pick by r
-> Save the file
-> close it
-> Here we go we can rename...

With Rename functionality in Advanced menu:
-> Click right on the commit
-> click on "edit commit"
-> Here we go we can rename

There is simply too much click to rename a commit...

In my company we care about commit message like a lot
and with gerrit review, we have a lot of renaming to do.
I converted a lot of people to git extension but they start complaining about that.
Moreover there is a plugin in eclipse which does this functionality...

@vbjay
Copy link
Contributor

vbjay commented Apr 10, 2016

That explanation makes it a little bit better. The only critique I would
have is that a rename has a different SHA-1. You could depending on the
state of remote branches end up with merge conflicts.

On Sun, Apr 10, 2016 at 9:03 AM lowdev notifications@github.com wrote:

In some cases we cannot edit a commit with fixup...
For example, you have 3 commits : A, B, C.
You want fix the commit A with some change in the commit B, you need to use
edit functionality.

It's just a case there is some other when editing is useful.

About renaming a commit with git extension :
-> Click right on the commit
-> Click on "rebase on current branch...."
-> Click on "show options"
-> Check "Interactive rebase"
-> Click on rebase
-> edit the rebase interactive file : change pick by r
-> Save the file
-> close it
-> Here we go we can rename...

With Rename functionality in Advanced menu:
-> Click right on the commit
-> click on "edit commit"
-> Here we go we can rename

There is simply too much click to rename a commit...

In my company we care about commit message like a lot
and with gerrit review, we have a lot of renaming to do.
I converted a lot of people to git extension but they start complaining
about that.
Moreover there is a plugin in eclipse which does this functionality...


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#3166 (comment)

@lowdev
Copy link
Author

lowdev commented Apr 10, 2016

Thanks you for the response.

About the comment on "rename functionality", i'm note sure to understand correctly.
Let's take this case :
We have three commits on your local branch:
C (SHA-1: 3333)
B (SHA-1: 2222)
A (SHA-1: 1111)
if i rename the commit A, i will have a new SHA-1: 4444. The remote branches doesn't have my
local changes so no merge conflict issue here when i will push my 3 commits.

A second case:
If i tried to rename just a commit on the remote branch called "branch A".
My local branch will have this commit with a new commit message.
Now if i rebase my local branch on "branch A" => My commit with a new commit message will disappear because there is no change. Nothing new to applied on "branch A".

I don't think there is a case where, just by changing the commit message, will end up with merge conflicts.
If you see an user case, please advice me. I will test it.

All is about having a good local branch before pushing.
With gerrit review, we have to take care about our local branch. (fixup is used but also edit and rename in some case it's easier to use this git feature)

@Radrik5
Copy link
Contributor

Radrik5 commented Apr 10, 2016

I would call it "reword" to be consistent with git interactive rebase.

@lowdev
Copy link
Author

lowdev commented Apr 10, 2016

+1 for "reword".
Btw i did a change request to add "edit" functionality.
#3167 (comment)

Once it's merged i will do the "reword" functionality.

@vbjay
Copy link
Contributor

vbjay commented Apr 10, 2016

If you rename a commit that has already been pushed you will get a merge
conflict if someone else pushed other changes.

On Sun, Apr 10, 2016 at 3:02 PM lowdev notifications@github.com wrote:

+1 for "reword".
Btw i have already did a change request to add "edit" functionality
#3167 (comment)
#3167 (comment)

Once it's merged i will do the "reword" functionality.


You are receiving this because you commented.

Reply to this email directly or view it on GitHub
#3166 (comment)

@lowdev
Copy link
Author

lowdev commented Apr 11, 2016

Thank you for your use case I will test it.

However about your comment
#3166 (comment),
we can already do a rebase interactive and reword a commit of a remote branch.

Your critic is not about my commit but about git. Isn't it ?

@vbjay
Copy link
Contributor

vbjay commented Apr 11, 2016

Yes. You never check out remote branches and commit on them. You check
out the local branch and merge or rebase the remote into local, and then do
your work and push to the remote.

http://www.gitguys.com/topics/tracking-branches-and-remote-tracking-branches/

On Mon, Apr 11, 2016 at 6:36 AM lowdev notifications@github.com wrote:

Thank you for your use case I will test it.

However about your comment
#3166 (comment)
#3166 (comment)
,
we can already do a rebase interactive and reword a commit of a remote
branch.

Your critic is not about my commit but about git. Isn't it ?


You are receiving this because you commented.

Reply to this email directly or view it on GitHub
#3166 (comment)

@lowdev
Copy link
Author

lowdev commented Apr 11, 2016

ok I guess we agree.

@lowdev
Copy link
Author

lowdev commented Apr 14, 2016

Do you want me to prevent the fixup (and squash) when the commit is already on the remote branch ?(and for edit and reword too)

@Radrik5
Copy link
Contributor

Radrik5 commented Apr 14, 2016

I don't think so. The user should be able to modify any history and do a force push if it's necessary.

@lowdev
Copy link
Author

lowdev commented Apr 14, 2016

Yeah i think so too...
About "reword" functionality. Do you want me to push it in the same feature branch (/feature/edit_advanced_menu) or should i create another branch ?

@Radrik5
Copy link
Contributor

Radrik5 commented Apr 16, 2016

I think it's better to use the same pull request. Don't expect your pull request to be reviewed and merged quickly. This is not very active project. My pull requests are usually merged within 1 - 6 months. But there is one opened on 18 Sep 2015 and still not reviewed.

@lowdev
Copy link
Author

lowdev commented Apr 18, 2016

Thanks for your responses Radrik5 !
I will take your advice and be patient ^^.

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

No branches or pull requests

4 participants