Issue
I am on POP OS which is based on ubuntu. trying to git commit but getting fatal: $HOME not set
.
I tried git config --global user.email "my email"
but not setting the config. also tried with sudo
still same error. i could not find any solution.
Solution
Try printing the content of $HOME
echo $HOME
if its empty you can just set it to your home directory by doing
For fish shell
set $HOME = /home/{_user_name_}
Answered By - Akki