[git-users] Is it possible cp some file from one branch to another without switch branch

2012-12-17 Thread lei yang
Hi expert, now I'm in the branch A, I want to copy some file from branch B to A any help? Lei --

[git-users] Re: Is it possible cp some file from one branch to another without switch branch

2012-12-17 Thread Thomas Ferris Nicolaisen
On Monday, December 17, 2012 1:58:53 PM UTC+1, lei yang wrote: > Hi expert, > > now I'm in the branch A, I want to copy some file from branch B to A > > any help? > > You have to commit changes in the current branch, so you have to switch first to the branch where you want to add and commit th

Re: [git-users] Is it possible cp some file from one branch to another without switch branch

2012-12-17 Thread Rick DeNatale
git checkout B -- somefile On Mon, Dec 17, 2012 at 7:58 AM, lei yang wrote: > Hi expert, > > now I'm in the branch A, I want to copy some file from branch B to A > > any help? > > Lei > > -- > > > -- Rick DeNatale Google+: +Rick DeNatale Blog:

[git-users] bash hook script for git

2012-12-17 Thread kumar
HI i have setup the following in the remote repository 1) git remote add --mirror=push mirrorepo http://gitrepo/mytestproject.git 2) Manually from my "mytestproject" folder if i run "git push mirrorrepo" the changes are pushed to the mirror repository. i want to put this in a script so that a

Re: [git-users] Is it possible cp some file from one branch to another without switch branch

2012-12-17 Thread Konstantin Khomoutov
On Mon, 17 Dec 2012 04:58:53 -0800 lei yang wrote: > now I'm in the branch A, I want to copy some file from branch B to A > > any help? Note that the already proposed git checkout $branch -- $filename git add $filename approach does not copy the file's history recorded in -- you only get the

Re: [git-users] Is it possible cp some file from one branch to another without switch branch

2012-12-17 Thread lei yang
Thanks for the tips, I have another question, If I forget branch B files' path, how chould I do without switch to B Lei On Mon, Dec 17, 2012 at 6:18 AM, Konstantin Khomoutov wrote: > On Mon, 17 Dec 2012 04:58:53 -0800 > lei yang wrote: > >> now I'm in the branch A, I want to copy some file from

Re: [git-users] Is it possible cp some file from one branch to another without switch branch

2012-12-17 Thread Thomas Ferris Nicolaisen
On Monday, December 17, 2012 3:22:26 PM UTC+1, lei yang wrote: > > Thanks for the tips, I have another question, If I forget branch B > files' path, how chould I do without switch to B > > You can explore the contents of other branches easily in any Git GUI tool. Or you can use command line:

Re: [git-users] Is it possible cp some file from one branch to another without switch branch

2012-12-17 Thread William Mizuta
You can use the option -r in git ls-tree to show all files from a branch: git ls-tree -r B With that, you can use a grep to find the file you are searching. William Seiti Mizuta @williammizuta Desenvolvedor da Caelum On Mon, Dec 17, 2012 at 12:27 PM, Thomas Ferris Nicolaisen wrote: > > > O

Re: [git-users] Re: interesting? observation about "git mv" propagation

2012-12-17 Thread Dale R. Worley
> From: Manlio Perillo > > [Git] "knows" that in your case they are the same: this is the > reason why the push was fast; your home repo already have the objects > with the same SHA. > > pull is slow because git has to unpack them; and yes, probably git could > be a bit more smart and check if a

Re: [git-users] Re: Looking for C# Git library

2012-12-17 Thread Konstantin Khomoutov
On Sun, 16 Dec 2012 22:18:51 -0800 (PST) Thomas Ferris Nicolaisen wrote: [...] > > Is there anything comparable for Git that I can pull from NuGet or > > some other source? > > > > > Libgit2 has bindings in > C#. It's also used