aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md15
1 files changed, 14 insertions, 1 deletions
diff --git a/README.md b/README.md
index fa59028..1a5f0ed 100644
--- a/README.md
+++ b/README.md
@@ -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`.