Re: [git-users] Interactive rebase, reorder, squash not working
From: "Magnus Therning" On 21 May 2015 at 09:06, Philip Oakley wrote: From: "Konstantin Khomoutov" Sent: Wednesday, May 20, 2015 4:02 PM On Wed, 20 May 2015 09:25:37 +0200 Magnus Therning wrote: [...] If you are using the command line I'd start with removing `notepad++` from the equation and go with the default (most probably that's `vi`). I seconds this. Personally I disagree ;-) I do use a balance of Windows and Git tools. (I remember the 70's with real teletypes, especially the good bits; but, just the same, if it's OK with you ...;-) I think you misunderstood me. My suggestion was to remove notepad++ from the equation *while troubleshooting*. Ahh, I'd read it as if it was a *solution* (and that vi was "the right thing" ;-). When I started I had to just close the unresponsive bash window when it got into vi mode - I now know to press 'q' to exit. Removing possible causes of the observed problem one at a time is a rather good strategy when troubleshooting, I find. Hopefully Michael has now got a workable solution to the editor of choice problem. -- Philip -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Interactive rebase, reorder, squash not working
On Thu, 21 May 2015 09:39:14 +0200 Magnus Therning wrote: > >>> If you are using the command line I'd start with removing `notepad > >>> ++` from the equation and go with the default (most probably > >>> that's `vi`). > >> > >> I seconds this. > > > > Personally I disagree ;-) I do use a balance of Windows and Git > > tools. (I remember the 70's with real teletypes, especially the > > good bits; but, just the same, if it's OK with you ...;-) > > I think you misunderstood me. My suggestion was to remove notepad++ > from the equation *while troubleshooting*. Removing possible causes > of the observed problem one at a time is a rather good strategy when > troubleshooting, I find. Yeah, that's what I read from the Magnus's message, too ;-) Just factor out Notepad++, as it seemed a bit tricky to set up, and see what happens. Since and interactive rebase wants to have an editor, stock bundled vi seemed like a good pick for debugging. If all works as expected, try to plug Notepad++ back in and concentrate on doing that thing correctly. That said, vi as shipped in GfW is indeed a bit long in teeth. But Vim also has a GUI version which looks just okay on Windows, and for those, like me, who invested into Vim's steep learning curve, working in a "normal" text editor is, well, not a pain, but it just does not feel right :-) -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Interactive rebase, reorder, squash not working
On 21 May 2015 at 09:06, Philip Oakley wrote: > From: "Konstantin Khomoutov" > Sent: Wednesday, May 20, 2015 4:02 PM >> >> On Wed, 20 May 2015 09:25:37 +0200 >> Magnus Therning wrote: [...] >>> If you are using the command line I'd start with removing `notepad++` >>> from the equation and go with the default (most probably that's `vi`). >> >> I seconds this. > > Personally I disagree ;-) I do use a balance of Windows and Git tools. (I > remember the 70's with real teletypes, especially the good bits; but, just > the same, if it's OK with you ...;-) I think you misunderstood me. My suggestion was to remove notepad++ from the equation *while troubleshooting*. Removing possible causes of the observed problem one at a time is a rather good strategy when troubleshooting, I find. /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: mag...@therning.org jabber: mag...@therning.org twitter: magthe http://therning.org/magnus -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Interactive rebase, reorder, squash not working
From: "Konstantin Khomoutov" Sent: Wednesday, May 20, 2015 4:02 PM On Wed, 20 May 2015 09:25:37 +0200 Magnus Therning wrote: [...] >>> I edit for pick 3 suchandsuch, pick 1 suchandsuch, pick 2 >>> suchandsuch, for starters (in reverse order), save and exit. >>> >>> However, when I verify the log, nothing seems to have happened. >> >> This sounds strange to me. What do you mean by "verify the log"? > > Using TortoiseGit, I "Show Log", and review, yet the same revisions > are in the same order, which leads me to believe that nothing > actually happened. I don't use TortoiseGit, and tend not to use GitExtensions either (but do keep GitExt up to date). I find those tools give a false/poor view of how the source control is happening which prevents me getting a good picture of what is where (e.g. the real remote server(s) vs local tracking branch(es)) Rather I (currently) use the "Msysgit" bash for command line stuff, then 'git gui &' and 'gitk -30 &' for the windows gui style visualisation, with Notepad++ as my core editor (see below). The '&' allows me to keep the windows open while still switching back to the bash window. I'm starting the shift to the newer G4W mintty bash window (and SDK when apprpriate) > >> After saving the rebase script and closing the editor, you should >> see Git actually working in your console as the `git rebase` >> command is rather chatty (by default). Something like "First, >> rewinding your HEAD to ..." then "Applying patch (N/M)" etc. Do >> you see this? Anything other there? > > Actually, no. I did not see anything like applying patches, etc. > There was a very succinct, one line response. Probably indicating > that nothing actually happened. How are you initiating the rebase, via command line or TortoiseGit? If you are using the command line I'd start with removing `notepad++` from the equation and go with the default (most probably that's `vi`). I seconds this. Personally I disagree ;-) I do use a balance of Windows and Git tools. (I remember the 70's with real teletypes, especially the good bits; but, just the same, if it's OK with you ...;-) I checked if Windows 7 still includes the venerable edit.exe from the MS-DOS time (Windows XP did have it) but it seems it doesn't anymore, and Git for Windows ships with Vim which is a console editor and hence it should reliably work for that edit -> close -> continue cycle. Sure, for a Windows user Git is quite atypical, but one just have to learn to hit to go to insert mode -- familiar for most Windows users -- fool around using cursor keys, , etc and then hit to return to normal more, where the ZZ command should save and quit. So I'd change the editor temporarily by git config --local --add core.editor vi For me: [core] editor = 'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noplugin works just fine. I don't have a link to the original thread/blog that gave it but it works just nice, with the Git editing coming up separately and distinctly from my regular tabbed editing window. and retry the rebase changing the first "pick" to "edit" and see what happens: if the rebase will continue and stop at that edit, the OP will be able to just run git rebase --abort to, well, abort the rebase. Hence, if that works, we'll be able to work on how to properly hook Notepad++ there. Otherwise the problem is elsewhere and probably the way to go would be running `git rebase` in trace mode. Hope this helps for an alternate viewpoint. regards Philip< -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Interactive rebase, reorder, squash not working
On Wed, 20 May 2015 09:25:37 +0200 Magnus Therning wrote: [...] > >>> I edit for pick 3 suchandsuch, pick 1 suchandsuch, pick 2 > >>> suchandsuch, for starters (in reverse order), save and exit. > >>> > >>> However, when I verify the log, nothing seems to have happened. > >> > >> This sounds strange to me. What do you mean by "verify the log"? > > > > Using TortoiseGit, I "Show Log", and review, yet the same revisions > > are in the same order, which leads me to believe that nothing > > actually happened. > > > >> After saving the rebase script and closing the editor, you should > >> see Git actually working in your console as the `git rebase` > >> command is rather chatty (by default). Something like "First, > >> rewinding your HEAD to ..." then "Applying patch (N/M)" etc. Do > >> you see this? Anything other there? > > > > Actually, no. I did not see anything like applying patches, etc. > > There was a very succinct, one line response. Probably indicating > > that nothing actually happened. > > How are you initiating the rebase, via command line or TortoiseGit? > > If you are using the command line I'd start with removing `notepad++` > from the equation and go with the default (most probably that's `vi`). I seconds this. I checked if Windows 7 still includes the venerable edit.exe from the MS-DOS time (Windows XP did have it) but it seems it doesn't anymore, and Git for Windows ships with Vim which is a console editor and hence it should reliably work for that edit -> close -> continue cycle. Sure, for a Windows user Git is quite atypical, but one just have to learn to hit to go to insert mode -- familiar for most Windows users -- fool around using cursor keys, , etc and then hit to return to normal more, where the ZZ command should save and quit. So I'd change the editor temporarily by git config --local --add core.editor vi and retry the rebase changing the first "pick" to "edit" and see what happens: if the rebase will continue and stop at that edit, the OP will be able to just run git rebase --abort to, well, abort the rebase. Hence, if that works, we'll be able to work on how to properly hook Notepad++ there. Otherwise the problem is elsewhere and probably the way to go would be running `git rebase` in trace mode. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Interactive rebase, reorder, squash not working
# flatw...@users.sourceforge.net / 2015-05-19 22:28:51 +0300: > On Mon, 18 May 2015 10:42:54 -0400 > Michael Powell wrote: > > > I have set the global editor to Notepad++ via a shell script: > > > > #!/bin/sh > > "C:/Program Files (x86)/Notepad++/notepad++.exe" -multiInst -notabbar > > -nosession -noPlugin "$(cygpath -w "$*")" > > Does this really work? (I mean, did you verify the second line of > your script by running it in Git Bash?) > I'm asking because in a Unix shell (and in cmd.exe too, FWIW) double > quotes do not nest so I'm having hard time trying to understand > what's this line supposed to do. SUSv4TC1, XCU 2.2.3 Double-Quotes The input characters within the quoted string that are also enclosed between "$(" and the matching ')' shall not be affected by the double-quotes, but rather shall define that command whose output replaces the "$(...)" when the word is expanded. The tokenizing rules in Token Recognition, not including the alias substitutions in Alias Substitution, shall be applied recursively to find the matching ')'. -- roman -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Interactive rebase, reorder, squash not working
On 19 May 2015 at 21:38, Michael Powell wrote: > On Tue, May 19, 2015 at 3:28 PM, Konstantin Khomoutov > wrote: >> On Mon, 18 May 2015 10:42:54 -0400 >> Michael Powell wrote: >> >>> I have set the global editor to Notepad++ via a shell script: >>> >>> #!/bin/sh >>> "C:/Program Files (x86)/Notepad++/notepad++.exe" -multiInst -notabbar >>> -nosession -noPlugin "$(cygpath -w "$*")" >> >> Does this really work? (I mean, did you verify the second line of >> your script by running it in Git Bash?) > > Yes, it "runs" as far as I know. I work in Notepad++, and when I save > and close N++, Git claims to have processed the file. > >> I'm asking because in a Unix shell (and in cmd.exe too, FWIW) double >> quotes do not nest so I'm having hard time trying to understand >> what's this line supposed to do. > > I'm not sure, that's what several blogs all report. Of course they > could all be agreeing on something that needs further elaboration that > I don't know about. > >> I also wonder how does "cygpath" work. Git for Windows is not a Cygwin >> application and I doubt it ships with the program named "cygpath". >> >>> Then I proceed with the interactive rebase: >>> >>> git rebase -i HEAD~3 >>> >>> I want to reorder the second commit to the top. I also want to squash >>> the first and third commits to a single commit >>> >>> I edit for pick 3 suchandsuch, pick 1 suchandsuch, pick 2 suchandsuch, >>> for starters (in reverse order), save and exit. >>> >>> However, when I verify the log, nothing seems to have happened. >> >> This sounds strange to me. What do you mean by "verify the log"? > > Using TortoiseGit, I "Show Log", and review, yet the same revisions > are in the same order, which leads me to believe that nothing actually > happened. > >> After saving the rebase script and closing the editor, you should see >> Git actually working in your console as the `git rebase` command is >> rather chatty (by default). Something like "First, rewinding your >> HEAD to ..." then "Applying patch (N/M)" etc. Do you see this? >> Anything other there? > > Actually, no. I did not see anything like applying patches, etc. There > was a very succinct, one line response. Probably indicating that > nothing actually happened. How are you initiating the rebase, via command line or TortoiseGit? If you are using the command line I'd start with removing `notepad++` from the equation and go with the default (most probably that's `vi`). /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: mag...@therning.org jabber: mag...@therning.org twitter: magthe http://therning.org/magnus -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Interactive rebase, reorder, squash not working
On Tue, May 19, 2015 at 3:28 PM, Konstantin Khomoutov wrote: > On Mon, 18 May 2015 10:42:54 -0400 > Michael Powell wrote: > >> I have set the global editor to Notepad++ via a shell script: >> >> #!/bin/sh >> "C:/Program Files (x86)/Notepad++/notepad++.exe" -multiInst -notabbar >> -nosession -noPlugin "$(cygpath -w "$*")" > > Does this really work? (I mean, did you verify the second line of > your script by running it in Git Bash?) Yes, it "runs" as far as I know. I work in Notepad++, and when I save and close N++, Git claims to have processed the file. > I'm asking because in a Unix shell (and in cmd.exe too, FWIW) double > quotes do not nest so I'm having hard time trying to understand > what's this line supposed to do. I'm not sure, that's what several blogs all report. Of course they could all be agreeing on something that needs further elaboration that I don't know about. > I also wonder how does "cygpath" work. Git for Windows is not a Cygwin > application and I doubt it ships with the program named "cygpath". > >> Then I proceed with the interactive rebase: >> >> git rebase -i HEAD~3 >> >> I want to reorder the second commit to the top. I also want to squash >> the first and third commits to a single commit >> >> I edit for pick 3 suchandsuch, pick 1 suchandsuch, pick 2 suchandsuch, >> for starters (in reverse order), save and exit. >> >> However, when I verify the log, nothing seems to have happened. > > This sounds strange to me. What do you mean by "verify the log"? Using TortoiseGit, I "Show Log", and review, yet the same revisions are in the same order, which leads me to believe that nothing actually happened. > After saving the rebase script and closing the editor, you should see > Git actually working in your console as the `git rebase` command is > rather chatty (by default). Something like "First, rewinding your > HEAD to ..." then "Applying patch (N/M)" etc. Do you see this? > Anything other there? Actually, no. I did not see anything like applying patches, etc. There was a very succinct, one line response. Probably indicating that nothing actually happened. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Interactive rebase, reorder, squash not working
On Tue, 2015-05-19 at 22:28 +0300, Konstantin Khomoutov wrote: > I'm asking because in a Unix shell (and in cmd.exe too, FWIW) double > quotes do not nest so I'm having hard time trying to understand > what's this line supposed to do. In a POSIX shell, quotes do properly nest if they're inside `` or $(...) because those are invoking a new process in a new shell: $ echo hi > "foo bar" $ echo "$(cat "foo bar")" hi $ echo "`cat "foo bar"`" hi -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Interactive rebase, reorder, squash not working
On Mon, 18 May 2015 10:42:54 -0400 Michael Powell wrote: > I have set the global editor to Notepad++ via a shell script: > > #!/bin/sh > "C:/Program Files (x86)/Notepad++/notepad++.exe" -multiInst -notabbar > -nosession -noPlugin "$(cygpath -w "$*")" Does this really work? (I mean, did you verify the second line of your script by running it in Git Bash?) I'm asking because in a Unix shell (and in cmd.exe too, FWIW) double quotes do not nest so I'm having hard time trying to understand what's this line supposed to do. I also wonder how does "cygpath" work. Git for Windows is not a Cygwin application and I doubt it ships with the program named "cygpath". > Then I proceed with the interactive rebase: > > git rebase -i HEAD~3 > > I want to reorder the second commit to the top. I also want to squash > the first and third commits to a single commit > > I edit for pick 3 suchandsuch, pick 1 suchandsuch, pick 2 suchandsuch, > for starters (in reverse order), save and exit. > > However, when I verify the log, nothing seems to have happened. This sounds strange to me. What do you mean by "verify the log"? After saving the rebase script and closing the editor, you should see Git actually working in your console as the `git rebase` command is rather chatty (by default). Something like "First, rewinding your HEAD to ..." then "Applying patch (N/M)" etc. Do you see this? Anything other there? -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Interactive rebase, reorder, squash not working
On 18 May 2015 at 16:42, Michael Powell wrote: > Hello, > > I'm not sure what I am doing wrong. > > I am running "git version 1.9.0.msysgit.0" on Windows 7 x64. > > I have set the global editor to Notepad++ via a shell script: > > #!/bin/sh > "C:/Program Files (x86)/Notepad++/notepad++.exe" -multiInst -notabbar > -nosession -noPlugin "$(cygpath -w "$*")" > > Then I proceed with the interactive rebase: > > git rebase -i HEAD~3 > > I want to reorder the second commit to the top. I also want to squash > the first and third commits to a single commit > > I edit for pick 3 suchandsuch, pick 1 suchandsuch, pick 2 suchandsuch, > for starters (in reverse order), save and exit. > > However, when I verify the log, nothing seems to have happened. > > Is this functionality not working on Windows? Or what am I doing > wrong, or not doing? I've never had any issues with `git-rebase` on Windows, so it ought to work. Did it work before you configured git to use notepad++? /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: mag...@therning.org jabber: mag...@therning.org twitter: magthe http://therning.org/magnus -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[git-users] Interactive rebase, reorder, squash not working
Hello, I'm not sure what I am doing wrong. I am running "git version 1.9.0.msysgit.0" on Windows 7 x64. I have set the global editor to Notepad++ via a shell script: #!/bin/sh "C:/Program Files (x86)/Notepad++/notepad++.exe" -multiInst -notabbar -nosession -noPlugin "$(cygpath -w "$*")" Then I proceed with the interactive rebase: git rebase -i HEAD~3 I want to reorder the second commit to the top. I also want to squash the first and third commits to a single commit I edit for pick 3 suchandsuch, pick 1 suchandsuch, pick 2 suchandsuch, for starters (in reverse order), save and exit. However, when I verify the log, nothing seems to have happened. Is this functionality not working on Windows? Or what am I doing wrong, or not doing? Thank you, Michael -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.