Re: [git-users] How to checkout files from another branch, based on a filelist from a text file?
Thanks everyone for the suggestions! I used first and worked fine. But I save all for later use. Thanks again, Konrad 2015.05.19. 18:21 ezt írta (Konstantin Khomoutov flatw...@users.sourceforge.net): 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 a topic in the Google Groups Git for human beings group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/git-users/zyNDoJ2DhWs/unsubscribe. To unsubscribe from this group and all its topics, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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?
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] How to checkout files from another branch, based on a filelist from a text file?
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 ) If you're not using bash, use: $ git checkout local_dev `cat dev_files.txt` Dale -- 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?
On Sun, 17 May 2015 23:59:23 -0700 (PDT) Konrád Lőrinczi klorin...@gmail.com wrote: [...] I can imagine a solution: Checkout files listed in diff_dev+local-dev_files.txt from local_dev to dev branch. This way I could stash them, and commit by selected groups. 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 -- 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.