The home(~) folder in my MacBook Pro is getting heavily cluttered by dotfiles. Is there any way I can neatly organise them.
I would like to group related dotfiles together(.eg. .bashrc .bash_profile .bash_history --> .bash folder). And all the dotfolders into a single directory like .config or .dotfiles.
How can I implement this without breaking anything if possible?
You can do that with symbolic links. If you move your dotfiles to .dotfiles directory, you can then create a symlink in your home directory for each file. For example if you moved .zprofile to the .dotfiles directory, you would create the symlink with:
ln -s ~/.dotfiles/.zprofile .