3

So I am quite new to GitHub, and I am trying to rebase my fork with an update of the ogininal master. Therefore I put:

git rebase "originial_remote"/"branch_name"

This seems to work, however I get an error

fatal: empty ident name (for <zeeuwwd@PC-18398.tsn.tno.nl>) not allowed

Which makes sense, because I think I committed the changes with a empty identity (this is because my Ubuntu chrashed, and I had to reinstall it, but didn't set the identity again..). So, my question is, now that I have added my identity to the account, how can I make sure that these previous commits also get the correct identity, because I think that this resolves the issue.

Any ideas? Thanks Guys! Wessel

  • Can I ask why you are rebasing branches on the remote? I'd highly recommend against doing that, because there is a chance you are going to compromise the remote. Instead, why don't you just merge the update of master into your local branch? – Bernhard Oct 08 '18 at 07:19
  • Ghehe, that is what I try to do! – Wessel de Zeeuw Oct 08 '18 at 07:21
  • No, you are specifically trying to `git rebase`. Avoid using `git rebase` completely. Unless you are the only developer on the project and have the branch only on your local machine. In all other cases you are going to create problems when you push, or when colleagues try to pull. Git shows you some warning message for a reason when you try to do this. – Bernhard Oct 08 '18 at 08:00

1 Answers1

-1

From git documentation:

git config --global user.name "John Doe"
git config --global user.email johndoe@example.com

https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup

You need to add user.name and user.email.

Edit: To change an author name:

How to change the commit author for one specific commit?

Patryk Rudnicki
  • 755
  • 1
  • 8
  • 21
  • Yes, but this doesn't change the author of the already committed changes. So I can't rebase or push/pull because these fields are marked as empty. – Wessel de Zeeuw Oct 08 '18 at 07:14
  • But pull or push is not related to this. You don't need to change author of commit to push changes. You need to use `user.name` and `user.email`. My propose is use ssh to download repo or pull changes. It's easier. This `user.name` and `user.email` is only to show author of commit. – Patryk Rudnicki Oct 08 '18 at 07:18
  • But to do this please check remote in this git repository. Remove old one for http and add for ssh. If you have more questions please ask. – Patryk Rudnicki Oct 08 '18 at 07:23