diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -64,6 +64,7 @@ git push -u origin master -v, --verbose Print each file as rsync transfers it -r, --restore Restore dotfiles from backup to original locations -q, --quiet Suppress stdout; write output to log instead + -p, --push Push to remote after commit -h, --help Show this help ``` @@ -82,12 +83,20 @@ Or automate with cron (silent, logs to `~/.local/share/dot-backup/backup.log`): 0 * * * * /path/to/dot-backup.sh -q ``` -After backup, push manually: +Push manually after backup: ```bash cd ~/Programming/GIT/my-dotfiles && git push ``` +Or set `GIT_REMOTE` in config and use `-p` to push automatically: + +```bash +./dot-backup.sh -p +# or combined with cron: +./dot-backup.sh -q -p +``` + ## Restoring on a New Machine Preview what would be restored first: @@ -118,8 +127,12 @@ Available options: DEFAULT_OUTPUT_DIR="${HOME}/Programming/GIT/my-dotfiles" LOG_FILE="${HOME}/.local/share/dot-backup/backup.log" DOTFILES_LIST="${HOME}/.config/dot-backup/files.list" +GIT_REMOTE="git@github.com:you/my-dotfiles.git" +GIT_BRANCH="master" ``` +`GIT_REMOTE` — if set, script ensures it is registered as `origin` on every run. Required for `--push`. `GIT_BRANCH` defaults to the current branch if unset. + ## Adding Files **Edit the script** — add paths to the `DOTFILES` array in `dot-backup.sh`. |
