Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Git Push to remote branch

Sudhindra Sharma July 17, 2019

Your local git email (git config --global user.email) does not match the one associated with your BitBucket account.

 

Even after changing the user name fot git config, i get the same issue 

3 answers

1 accepted

0 votes
Answer accepted
Sudhindra Sharma July 17, 2019

This is solved now. I deleted the local.git folder completely and pull it again and copy, solved the issue

0 votes
Julius Davies [bit-booster.com]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 18, 2019

 

The problem is the commit metadata (with the incorrect email address) is sealed inside the commit object.

Type "git log --pretty=fuller" to see your branch's commit objects (including their metadata).

If it's just the tip commit that's causing the problem, this can fix the problem:  "git commit --amend --reset-author".

If several commits on  your current branch have the wrong email address, it's harder to fix.  Here's a more detailed solution for that scenario:  https://bit-booster.com/author.html

OR... you can completely delete your local git clone and start fresh.  I see that's the solution you arrived on.  It's a good solution - especially if the work you're trying to push is simple and easy to redo.

 

p.s. If you're on Bitbucket Server or Bitbucket Data Center you can ask your admin to try  installing the free Control-Freak plugin since it has better error messages for this stuff.  My company maintains that plugin.

0 votes
Sudhindra Sharma July 17, 2019

already tried setting correct username and committer name using 
git config --global user.email commands 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events