On Fri, Mar 08, 2013 at 12:09:34PM -0800, Min Chen wrote: > A lesson learnt, just tried git apply <patch> and git am < patch on my > system, it seems that I should use "git am" to apply the patch, which will > automatically add those new files into tracked files. I will use "git am" > in the future.
Unfortunately it will depend on what format the patch is in. If it's got the commit details in the header, then yup: git am is the way to go. If it's just a raw patch, then git apply, plus git add and git commit (with --author='Foo Bar <f...@bar.com' for proper commit attribution).