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:
rem
Hopefully, if user may reset/revert the local commit and then recommit the code after correcting the name in global configuration, this will make the push successful. Here is a way to revert commit:
git reset HEAD~1 -- revert changes made to the index (i.e., that you have added)
For now, I tried the empty commit and also tried to commit the same file with some space (to attempt a fake commit) but both (above solution and fake commit) did not work for me. Then I just removed the cloned repository and re cloned it and then committed the code again and this time Push was done successfully, as I already changed the name in configurations.