I dont know of an easy, clean and elegant way of doing what you ask. I wonder what happens if you edit /etc/passwd with the new name, I wouldn’t dare to try. The way I’d proceed though is to start a bare repo with my dotfiles, so if anything happens, I’m back in business with minimal configuration changes.
This is a video about bare git repo: https://www.youtube.com/watch?v=tBoLDpTWVOM&t=0
Stolen from this other video: https://www.youtube.com/watch?v=ApkoY-PN0Nk&t=0
Would yes command work ?