I was applying a diff file of an opensource project on the top of my repository using git-am :
git am -3 < /Downloads/refactorWork.diff
but it had conflicts and i had to resolve them; but after resolving the conflicts and staging them, when i did git am --continue i got :
fatal : empty ident name (for <>) not allowed
I looked up on the internet and found this which seemed to be similar to my problem but my usename and email were already added up in global and local git directories. Here is the output of git config list :
rohan@~/Documents/libo : $ git config --global --list [email protected] user.name=Rohan Kumar alias.l=log --oneline --graph --pretty credential.helper=cache
Although i solved this by first commiting the staged changes and then using git am --skip
, I am interested in knowing what does that error means and whether what i did was the correct way of doing it, or is there any better way?
When linking a commit to a Story, you may see "Unknown Author" in the Commit section. This indicates that the email address you used in your GitHub, GitLab, or Bitbucket account doesn't match the email address you used for your Shortcut account. To correct this: Go to Settings > Your Account > Email Addresses.
Run git config --global user. email "[email protected]" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository.
This diff file is a plain diff, not something generated by git format-patch
. A format-patch
generated diff contains information about the commit author, author date, commit message, ... and maintains this information when creating the commit(s).
Your plain diff does not have these information, so git am
will complain that it is missing naturally.
You should instead have used git apply
which is meant to apply simple patch files like you have in this case which will only apply the patch to the worktree (and index if you tell it to) but does not create any commit automatically.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With