Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Expected Committer Name Git Push Issue

Tags:

git

push

I'm trying to commit/Push some code to GIT, but when I tried to commit the code using SourceTree it gave me an error:

remote: Push rejected.[K
remote: 
remote: refs/heads/Branch Details: 6a5d6d4cdd53db591e53db78c51225a619af487f: expected committer name 'Your Name Complete' but found 'Your Name'[K
remote:

Commit is done, but code is not pushed to remote.

I just noticed in the Global setting that my was "Your Name" and I changed it (TO: Your Name Complete) in Global configuration, also verified the name in Tools --> Options and its showing "Your Name Complete" now. I also tried:

git config --global user.name "Correct User Name"
git config --global user.email "[email protected]"

but still unable to Push the changes, still the same error can any one help me to push the code to remote repository?

like image 220
NoNaMe Avatar asked Oct 08 '15 07:10

NoNaMe


People also ask

What is the push command in git?

The git push command is used to upload local repository content to a remote repository. Pushing is how you transfer commits from your local repository to a remote repo. It's the counterpart to git fetch , but whereas fetching imports commits to local branches, pushing exports commits to remote branches.


2 Answers

Following the example of this blog post (it was for a tag, in your case it is for a branch HEAD), you would need to amend at least just the branch HEAD you want to push:

git commit --amend --allow-empty --author="LastName, FirstName <[email protected]>"

And then push.

like image 127
VonC Avatar answered Sep 18 '22 12:09

VonC


I faced the same issue, reverting the changes, and then updating the git config and recommitting worked for me.

like image 24
Vipul Sharda Avatar answered Sep 16 '22 12:09

Vipul Sharda