Whenever we see this error. Follow the below steps
Step 1: Find out whether the username has added into the GitBash or not
CMD: git config --list
Step 2: Add the username which is similar to github. Go to Github --> Profile --> You will see your name and next something like this basha_fxd
CMD: git config --global user.name "basha_fxd"
Step 3: Run the same code Step 1. You will see that your username has added.
Step 4: Run the below code and it will take your success.
git commit -m 'Updated the Code