Back Up Dotfiles with Git¶
Commands and scripts for backing up system configurations and dotfiles with Git.
Repository Syncing¶
Clone the maintenance repository via SSH:
Fetch and merge the latest dotfile changes from the remote repository:
Force overwrite local files with the remote main branch (useful for fresh installs):
Staging & Committing¶
Stage all modified maintenance scripts and dotfiles:
Stage only modified and deleted files (ignore new untracked files):
Commit staged changes with a descriptive message:
Push committed changes to GitHub:
Status & History¶
Show working tree status (modified dotfiles, untracked scripts):
Show unstaged changes within the scripts:
View the last 5 commits to track recent system changes:
Discard uncommitted local changes to a specific script: