How to apply a patch using git without configuration

I've written some instructions that also use git to apply some patches. The instructions are intended to be installed in the console and run with it. Like this:

git am bar.patch
git am foo.patch

      

But git now asks for username / email:

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'root@user-VirtualBox.(none)')
You need to set your committer info first

      

This doesn't seem to be required as only the author of the patches appears in the git log, but not the one who applied them. Is there a way to ignore the configuration?

edit: typos

+3


source to share


1 answer


See " Difference between author and committer in Git? "

When you apply a patch, you are the committer. Therefore, Git needs to know who "you" are.



Regarding git am , I would recommend using --committer-date-is-author-date

if you want the date associated with these commits created by these patches to be the same as the date recorded in the said patches.

+1


source







All Articles