Re: [git-users] Interactive rebase, reorder, squash not working

2015-05-19 Thread Magnus Therning
On 18 May 2015 at 16:42, Michael Powell mwpowell...@gmail.com 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.


Re: [git-users] How to checkout files from another branch, based on a filelist from a text file?

2015-05-19 Thread Konstantin Khomoutov
On Mon, 18 May 2015 22:05:48 -0400
wor...@alum.mit.edu (Dale R. Worley) wrote:

 Konstantin Khomoutov flatw...@users.sourceforge.net writes:
  My problem is, that I can not see possibility to checkout files
  from another branch, based on a filelist from a text file.
 
  Once you have a text file with the list of file names,
  just do
 
$ git checkout dev
$ while read fname; do \
  git checkout local_dev $fname; done  dev_files.txt
 
 Even shorter:
 
 $ git checkout local_dev $( cat dev_files.txt )

Sure.

But well, I'm a programmer, and hence when looking at a construct such
as this I'm sort of automatically thinking what happens if
dev_files.txt contains 1000 lines? ;-)  I mean, it will blow up on
a file of hefty size while the `while` construct will handle anything
one shovels at it.

But of course your one-liner is great for a simple case.

 If you're not using bash, use:
 
 $ git checkout local_dev `cat dev_files.txt`

  $() is not a bashism: it's defined in POSIX [1].

1. 
http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_03

-- 
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

2015-05-19 Thread Konstantin Khomoutov
On Mon, 18 May 2015 10:42:54 -0400
Michael Powell mwpowell...@gmail.com 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

2015-05-19 Thread Michael Powell
On Tue, May 19, 2015 at 3:28 PM, Konstantin Khomoutov
flatw...@users.sourceforge.net wrote:
 On Mon, 18 May 2015 10:42:54 -0400
 Michael Powell mwpowell...@gmail.com 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.