sudo gitlab-rails console --sandbox

Category: GitLab

sudo gitlab-rails console --sandbox

Open a console where changes roll back

Starts the Rails console in sandbox mode, where every database write is rolled back when you exit. Great for testing destructive operations safely. Reads behave normally, so queries and lookups are unaffected.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.