Can't commit due to encoding error.

Deleted user December 8, 2020

I've tried to do the welcome task to learn how to commit files.

It turns out I'm unable to do that. After clicking Commit a message pops up:

Failed to detect original file encoding. Cannot save commit with unknown encoding

 

No matter what text I paste I always get the same message.

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

7 votes
Answer accepted
Christopher Mancuso
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 4, 2021

I had the same error and it appears that the encoding issue was in the filename field. This happened when I copy/pasted from the example which likely bought over non UTF-8 characters. Try clearing and then typing in the filename manually.

Karthik V
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 9, 2021

This worked. I changed the name of the file and then it fixed.

Like # people like this
0 votes
Hossam Nasser
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 24, 2022

I solved it by editing the file locally and then pushed the code to the remote repository.
Now whenever you make any new change to the same file on the remote server you won't receive this error.

0 votes
Muhammad Ramzan(Atlassian Certified Master)
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.
December 8, 2020
Deleted user December 9, 2020

I'm not sure how it is supposed to help me. They talk about a bug that is not yet fixed.

TAGS
AUG Leaders

Atlassian Community Events