Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Commit encoding change

Tags:

git

encoding

I have some files with us-ascii encoding committed to repository. When I change encoding to utf-8 I cannot commit, because I get:

$ git status
# On branch master
nothing to commit (working directory clean)

How can I commit such changes?

like image 841
Adam Pierzchała Avatar asked Jun 29 '26 10:06

Adam Pierzchała


1 Answers

The 6 year old comment from @reactormonk worked for me. I put a comment in the file, where the comment had a UTF-8 character. Committing that change set the file encoding to UTF-8.

like image 189
Teddy Avatar answered Jul 01 '26 02:07

Teddy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!