On Mon, 17 Dec 2012 04:58:53 -0800
lei yang <yanglei.f...@gmail.com> 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 <branch> -- you
only get the file's contents.
In general, it's impossible to copy a file from one branch to another,
preserving its history.
Also note that if you want to save the file's contents into a
differently named file, you should use another approach:
git show $branch:$filename > $newfilename