Skip to content

fix: require remote and guard setup against destructive overwrites - #8

Merged
npfedwards merged 1 commit into
masterfrom
feature/issue-78-setup-safety
Jul 2, 2026
Merged

npfedwards merged 1 commit into
masterfrom
feature/issue-78-setup-safety

Conversation

@npfedwards

Copy link
Copy Markdown
Owner

Summary

  • Require -r on all SSH commands (setup, hooks, restart, rerun, rollback, log, upload) — no default to origin
  • Refuse to overwrite existing post-receive hook unless --force
  • Skip git init when remote .git already exists

Breaking change: every remote command now requires -r production (or similar).

Closes mislav#78.

Test plan

  • bundle exec rspec spec/setup_spec.rb spec/hooks_spec.rb spec/cli_spec.rb
  • git deploy setup without -r aborts with clear message
  • git deploy setup -r production --force overwrites existing hook

Require -r on all SSH commands (setup, hooks, restart, etc.) instead of
defaulting to origin. Refuse to overwrite an existing post-receive hook
unless --force is passed, and skip git init when the remote repo exists.

Closes npfedwards/git-deploy#78 (upstream mislav#78).

Co-authored-by: Cursor <cursoragent@cursor.com>
@npfedwards
npfedwards merged commit d500b0b into master Jul 2, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Running without an argument will destoy origin/master

1 participant