First, backup your current ~/.config/:
cp -r ~/.config ~/.config.bakThen, navigate to ~/.config and initialize a git repository with default branch name main:
git init --initial-branch=mainAdd remote repository:
git remote add origin https://github.com/Orion-zhen/dot-config.gitFetch content and reset current commit to main:
git fetch && git reset --hard origin/mainAssociate local branch with remote branch:
git branch --set-upstream-to origin/mainFinally, copy the backup files:
cp -rn ~/.config.bak/* ~/.config/Parameter -n will not overwrite existing config files.